4 ms·
Exactly. Without new features and syntaxes people would still be doing MyClass.prototype.method = function () { } like idiots. Such a meaningless argument for p
by rty32 2y ago
Exactly. Without new features and syntaxes people would still be doing MyClass.prototype.method = function () { } like idiots. Such a meaningless argument for preventing progress.
- szastamasta 2y agoNobody needs classes nor prototypes in JS. Objects + functions is more than enough. I stopped using these few years ago and miss nothing.
- rty32 2y agoIDE support is often hit or miss with these, I have seen too much of it. Don't use vscode or never bother to write jsdoc/do any strict typing? Never mind. Good luck with your codebase.
- jitl 2y agoYou and "anybody" are actually two different sets of people with different needs and desires
- wruza 2y agoIt is enough, but not more than. Collecting functions in a group by operating on a shared context is naturally useful and convenient. Pretending otherwise leads to all sorts of “a method, but I see it as a function with an accidental first parameter in a homonimous namespace because having a function name prefix is ugly, and it’s all ugly, but at least it’s not a class”. import * as fooNs from './foo' fooNs.barBazQuuxFoo(foo, …) vs foo.barBazQuux(…)