525 karma · joined November 3, 2015
This[0] page says this problem can be also seen in Typescript. But TS has the arrow function as a class method feature that in Javascript is only at stage 2 in it's way to standardization, so it's easier to solve there.
[0] https://github.com/Microsoft/TypeScript/wiki/'this'-in-TypeS...
[0] https://en.m.wikipedia.org/wiki/Esoteric_programming_languag...
We ended up using NodeBB because the person who was going to maintain it was more comfortable with Javascript than Ruby.
Last time I checked it needed you to subscribe through some provider who charges money, ISPs used to offer it with the Internet access. Is it really possible to access for free?
It doesn't work that way.
They might burn some CPU cycles but surely the ads themselves burn much more.
Are they making money with software they didn't build? Yes, but so are we.
The software itself was available for download for a time.
Using arrow functions at the class level would also solve this without adding new syntax. Edit, this is a thing already: https://babeljs.io/docs/plugins/transform-class-properties/
class Foo {
bind function bar() {
console.log(this);
}
}
So behind the scene it would do `this.bar = this.bar.bind(this);`But I assume these apps have spent a considerable amount of time in optimizing electron, which not everyone can do.