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

Rick Johnson rantingrickjohnson at gmail.com
Tue Mar 27 12:28:34 EDT 2018


On Tuesday, March 27, 2018 at 8:46:54 AM UTC-5, Chris Angelico wrote:
[...]
> Cool, so Greg was right: you can't get a reference to a
> method or function. You need magic to simulate it.

Since when did utilizing a method to request a specific
value become some sort of magic?

Do you consider this to be magic?

    os.lstdir('C:\\')

What about this?

    ''.join(map(chr, [109, 101, 97, 116, 32, 104, 101, 97, 100]))

Even though i prefer Python's way better, the implicit
return of Python function references is far more "magical"
than making an explicit call to a method will ever be.

Python Zen Says: "Explicit is better than implicit"
    
Hmm, i suppose Python's constancy is overrated[1]. 

[1] Which is merely a nice way of saying: "It's a lie!".



More information about the Python-list mailing list