News for hackers. Stuff that matters.
Re:Stop writing lambda expressions in Python by BerislavLopac on Friday September 28, 2018 @07:25AM (#18092523)
So if I understand correctly, in Javascript a fat arrow is just the syntax sugar for:

    var x = function(x){ return x };
Re:Stop writing lambda expressions in Python by mlcdf on Friday September 28, 2018 @09:14AM (#18093019)
It also changes the behavior of this. [0]

[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Stop writing lambda expressions in Python by wwright on Friday September 28, 2018 @09:02AM (#18092949)
The two biggest differences iirc:

- it can never be named

- it inherits `this` lexically from its parent scope (which imo is the sane default)