3 ms·
Supporting operator overloading is part of the linked TS issue [1]. But I'm more curious: why did operator overloading in ES6 itself [2] die? [1] https://gith
by glkindlmann 4mo ago
Supporting operator overloading is part of the linked TS issue [1]. But I'm more curious: why did operator overloading in ES6 itself [2] die?
[1] https://github.com/microsoft/TypeScript/issues/42218 https://github.com/microsoft/TypeScript/issues/42218
[2] https://github.com/tc39/proposal-operator-overloading https://github.com/tc39/proposal-operator-overloading
- bluepnume 4mo agoProbably if nothing else, impossible to have it perform well without static typing?
- glkindlmann 4mo agoBut traversing the prototype chain (to figure out method dispatch) is also potentially slow without static typing, and we're managing that ok, no?
- bluepnume 4mo agoTrue enough. Although personally I prefer to just use regular functions rather than big inheritance chains.