Re:Leaving Python for JavaScript
by zeugmasyllepsis on Friday August 25, 2017 @11:58AM
(#15099417)
I'm guessing, since the author used the arrow shorthand notation in Javascript as an example, that the limitations of Python's lambdas are the chief complaint
[ Parent
| on HN ]
It's more of a feature than an arbitrary limitation I think. Python philosophy, 'explicit over implicit', and that stuff.
Re:Leaving Python for JavaScript
by zeugmasyllepsis on Friday August 25, 2017 @01:04PM
(#15100164)
An intentional limitation, then :P
I tend to agree with the Python philosophy, that it's usually better to extract and name a function that to declare it inline. The `asyncio` module and `await` keywords go a long way in eliminating most use cases where I'd still prefer an anonymous function, for arbitrary callbacks.