r/javascript • • Jul 10 '16

The JavaScript language reboot is done

https://medium.com/@velmu/the-javascript-language-reboot-is-done-7bcec4be2cb6#.dy2fyy9j1
41 Upvotes

98 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jul 10 '16

[deleted]

1

u/[deleted] Jul 10 '16

Yeah, despite working with arrow functions for nearly a year, I still find them infinitely more difficult to understand and comprehend than the non-arrow version. The syntax is just so poor.

12

u/hyperhopper Jul 10 '16

Alright, I really hate to be that asshole on the internet, but if you are working with them for a year, and can't figure it out, programming might not be for you.

let that = this;
function (a) {
    return a + that.b;
}

is the same as

a => a + this.b

It's really not difficult or novel at all.

2

u/WorkshopX Jul 10 '16

upvote for a simple example of arrow functions effect on this binding. Well done.