Ruby parens-free function calls [was Re: Accessing parent objects]

Chris Angelico rosuav at gmail.com
Mon Mar 26 16:03:49 EDT 2018


On Tue, Mar 27, 2018 at 5:37 AM, Rick Johnson
<rantingrickjohnson at gmail.com> wrote:
> The supposed "inconsistent behavior" here has absolutely
> nothing to do with Ruby, no, it's all on _you_. _YOU_ are
> the one who created a non-sensical function with a single
> char name; and _YOU_ are the one who placed a call to that
> function in the middle of an expression, which, on first
> glance, looks to be a common numeric addition or string
> concatenation. There are no syntactical clues that `a` is a
> function. Thus, it is _YOU_ who is to blame for the supposed
> "unexpected output".
>
> Ruby followed the rules.
>
> But you didn't.

Yeah, it's entirely Steven's fault that he was expecting cricket but
Ruby wanted to play Calvinball. But hey, Ruby was totally following
the rules.

ChrisA



More information about the Python-list mailing list