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

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.

1

u/[deleted] Jul 10 '16 edited Jul 10 '16

I've been a programmer for 20 years. I have no problem figuring them out. It's just the syntax I have a problem with. And by problem I don't mean I don't understand it, I mean the syntax was poorly thought out and all around sucks. And yes, I know that the syntax was borrowed from other languages, but that doesn't mean the syntax didn't suck in those other languages too.