News for hackers. Stuff that matters.
Re:Javascript Fundamentals: ‘this’ keyword by paol on Saturday August 25, 2018 @02:27PM (#17841876)
It's really frustrating that the ECMA people didn't define class methods to always be bound just like arrow functions. Like arrow functions, classes are a new syntax so there are no backward compatibility concerns.

That said, having two different semantics based on which syntax you happened to use to define a function is almost as big a programmer trap as the original problem. It just goes to show there are no good solutions to fundamental language design errors.

Re:Javascript Fundamentals: ‘this’ keyword by aphextron on Sunday August 26, 2018 @02:50PM (#17847229)
>It's really frustrating that the ECMA people didn't define class methods to always be bound just like arrow functions.

This is a huge annoyance because I never really know where to bind my events. It always ends up just being an awkwardly placed "bindEvents" call somewhere in the init function.