Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

precedence for x and ~

6 views
Skip to first unread message

Juerd

unread,
Feb 19, 2005, 6:53:50 PM2/19/05
to perl6-l...@perl.org
According to S03, ~ is tighter than x, while in Perl 5, . was looser
than x.

This can be surprising in things like

"@" x 75 ~ $zap

Which has to be written as

("@" x 75) ~ $zap

in order to make sense.

Was this intentional? What is the rationale?


Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html

Damian Conway

unread,
Feb 19, 2005, 7:28:09 PM2/19/05
to perl6-l...@perl.org
Juerd wrote:

> According to S03, ~ is tighter than x, while in Perl 5, . was looser
> than x.

No. According to S03, *unary* ~ is tighter than x. *Binary* ~ is looser:

> symbolic unary ! + - ~ ? * ** +^ ~^ ?^ \
> multiplicative * / % x xx +& +<< +>> ~& ~<< ~>>
> additive + - ~ +| +^ ~| ~^

Damian

Juerd

unread,
Feb 19, 2005, 7:43:46 PM2/19/05
to Damian Conway, perl6-l...@perl.org
Damian Conway skribis 2005-02-20 11:28 (+1100):

Oh. I'm ashamed to admit I hadn't looked at the first column. Sorry.

0 new messages