3 pointsby bluepnume7 hours ago2 comments
  • glkindlmann4 hours 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

    [2] https://github.com/tc39/proposal-operator-overloading

    • bluepnume4 hours ago
      Probably if nothing else, impossible to have it perform well without static typing?
  • newaccountman27 hours ago
    Am I incorrect in thinking this is not a TypeScript problem, but a problem most languages have, and that TypeScript is one of the few with a neat little solution?
    • bluepnume6 hours ago
      In most languages you could probably solve this problem with a class. But wrapping all your numbers in a class with runtime consequences, just for a bit of extra type safety, feels quite extreme.