Larry Wall writes:

> Also of note is that we decided to keep the relative precedence of
> assignment and comma the same as in Perl 5.  It's just good
> documentation to parenthesize your lists when assigning,

Fair enough; documentation is good.

> ... and it prevents nasty surprises when C programmers write things
> like:
> 
>     loop $i = 0, $j = 0; $i < 10; $i++, $j += 10 {...}

But I'm less convinced by that reason -- surely we shouldn't be making
it easy for C programmers to write things lie that?

To put it another way round, I've not yet encountered somebody learning
Perl using loops like the above, but I've often seen them omit the
parens in list assignment; this seems like the wrong optimization to me.

Possibly it would suffice to have a better warning.  (Yes, I know that
use diagnostics explains what's up, but few beginners seem to discover
diagnostics by themselves, and the actual warning is often puzzling.)

> Anyway, feel free to point out any infelicities we might not have
> considered.

It looks good to me!

Smylers

Reply via email to