On Sat, Jan 17, 2015 at 9:49 PM, Jussi Piitulainen
<jpiit...@ling.helsinki.fi> wrote:
> I've only seen small amounts of Ruby code on the net. The only way I
> can make some sense of that is if it gets analyzed as follows, using
> parentheses for calls:
>
>  a + b => 7  # a() + b => a(4) + b => 4 + 2 + 1
>  a+b   => 7  # a() + b
>  a+ b  => 7  # a() + b
>  a +b  => 3  # a(+b)   => a(b) => a(1) = 1 + 2
>
> I'm not quite fond of such surprise in programming language syntax.

Every once in a while, someone looks at Py2's print statement and
Py3's print function and says, "why not allow function calls without
parentheses". This right here is why not. Wow. That is one nasty
surprise.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to