Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
MoTTs_
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
MoTTs_
8y ago
The issue we complain about in JavaScript is one like this: class C { handleEvent() {} someMethod() { onEvent(this.handleEvent); // bad; "this" lost onEvent(this.handleEvent
2.
▲
by
MoTTs_
8y ago
In C++ you have to use bind too.
3.
▲
by
MoTTs_
9y ago
On the contrary, classes and inheritance in both Python and JavaScript behave basically the same. In Python, classes are objects (a building, not a blueprint), and inheritance is done by delegation. https://i.imgur.com/p9Kw8
4.
▲
by
MoTTs_
9y ago
> One of the last languages supporting prototype-based inheritance... Actually, all this time, both Python and Ruby use what we would call prototype-based inheritance. https://www.reddit.com/r/node/comments/
5.
▲
by
MoTTs_
9y ago
Beware referencing or learning from Eric Elliott. https://www.reddit.com/r/javascript/comments/6q2lk0/why_comp... https://www.reddit.com/r/javascript/comments/5c5lkq/w