Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
chris_wot
11y ago
0 comments
Save
Share
Especially when you need to do something like:
var that = this;
0 comments
7 comments · 2 top-level
top
newest
oldest
bryanlarsen
11y ago
· 3 in thread
That's not generally necessary in ES6 when you use "=>" to define functions. Javascript is getting better...
neurosnap
11y ago
What happens when you nest anonymous functions? Would you have to use the arrow operator at every level?
chris_wot
OP
11y ago
It's really a minor criticism and I know ES6 resolves the issue :-)
chris_wot
OP
11y ago
Through bind of course, for the silly person who downvote me. Helps to have strict mode on. Happy to have educated you!
sergiotapia
11y ago
· 2 in thread
Looking at you Ember. Ugh!
var controller = this;
Every time!
chris_wot
OP
11y ago
They have to. There's a bug in the JavaScript spec that makes you do this :-) they are perfectly correct in doing what they are doing, if they didn't then funny thing would start to happen. Sad, but true.
chris_wot
OP
11y ago
Uh, what's the reason for the downvote?
2 more replies
j
/
k
navigate · click thread line to collapse