r/eli5_programming • • Nov 02 '17

ELI5: Javascript arrow function notation?

And what are the advantages of arrow notation vs standard?

10 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/fukitol- Nov 03 '17

Honestly I'm not sure how I feel about changing the context of this. It sounds good on the surface, but I don't like magic and making an arrow function's this behave differently than everything else is magic.

0

u/[deleted] Nov 03 '17

[deleted] — view deleted comment

1

u/fukitol- Nov 03 '17

I get that, but it's still a special case. It's an easy one to remember but also seems like it could be easy to forget. And a bug like that seems like it'd be hard to track down.