Abigail writes:

> On Fri, Dec 22, 2006 at 05:15:15PM +0000, Smylers wrote:
> 
> > Abigail writes:
> > 
> > > On Fri, Dec 22, 2006 at 05:18:45PM +0100, Juerd wrote:
> > > 
> > > > But the following set of wishes clashes heavily:
> > > > 
> > > > - () can be used for grouping (to override precedence)
> > > > - () can be used to enclose subroutine arguments
> > > > - subroutines can also be used without ()
> > > 
> > > Perl5 had no problem coping with those rules
> > 
> > Yes it does.  Perl 5 suffers ...
> > 
> >   print (3 + 4) * 6;
> > 
> > ... is treated as:
> > 
> >   (print 3 + 4) * 6;
> > 
> > That's hateful!
> 
> No, it's not.

Yes it is!  It trips people up in practice.  Multiplication is supposed
to be commutative, yet interchanging its operands can yield a different
result.

> If you had it your way, ...

_My_ way?  I was merely pointing out the hate in the Perl 5 way of doing
this; I wasn't trying to defend any alternative way (apologies if I gave
that impression).

I explicitly acknowledged the hate you had pointed out in the Perl 6
way.  I don't see pointing out hate in one as being a defence of the
other: I am quite open to them both being hateful simultaneously!

>     print sqrt (9) + sqrt (49)
> 
> would print '4' and not '10'. I doubt many people would expect it to
> print 4.

Yup, that's hateful.

Smylers

Reply via email to