[prev] [thread] [next] [lurker] [Date index for 2006/12/23]
Smylers writes: > 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. It is just operator precedence, which already makes multiplication non-commutative if you ignore it. C also makes "f (b) * c" different than "f c * (b)", although its semantics are less surprising (unless, perhaps, c is parenthesized as well). Is that hateful in C? MichaelThere's stuff above here
Generated at 03:02 on 01 Jan 2007 by mariachi 0.52