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

Rick Johnson rantingrickjohnson at gmail.com
Mon Mar 26 17:19:12 EDT 2018


On Monday, March 26, 2018 at 3:09:38 PM UTC-5, Python wrote:
> On Mon, Mar 26, 2018 at 11:37:35AM -0700, Rick Johnson wrote:
[...]
> > Ruby followed the rules.
> > But you didn't.
>
> Nonsense... Your language's syntax parser is what defines
> the rules. All of the expressions Stephen wrote did not
> yeild a syntax error, therefore he "followed the rules."

Hmm. If "syntax parser rules" could prevent poorly formatted
code, then there'd be no need for style guides.

> > No self-respecting professional programmer would ever
> > write in such a manner.
>
> I think your expectation here is much too high.  I've seen
> A LOT of Perl written by, for example, professional
> testers, of this ilk, and I've seen it cause bugs when a)
> they got the syntax very slightly wrong, or b) they got the
> syntax right but someone else to whom the intention wasn't
> clear "fixed" it.

Perl is a special case (and thus not a good retort) because
the language itself was purposely intended to be cryptic.
Thus, what Perl programmers consider to be "normal and
perfectly acceptable code" would cause the rest of us to run
away in horror.

    "Debug that mess?" o_O
    
    "NO WAY!"

> Humans are already good enough at making mistakes that they
> require no additional encouragement, such as what is
> provided by allowing such syntactical horrors.

Agreed. And that's why we must respect and follow the code
styling wisdom which has been passed down by those who
struggled before us. Sure, the behavior that Steven
uncovered is odd, but it could be that Maz harbors a strong
disliking for undisciplined pupils, and thus, he designed
and placed this little trap in the hopes the pain it induced
might encourage the petulant little meat-heads to follow
some sensible styling rules.

IOWs: It's not a bug, dude, it's a feature.

PS: ("meat-head": it's what's for dinner)




More information about the Python-list mailing list