8
lorentz
5y

There's plenty of literature about how to emulate classes and interfaces flawlessly in JS even without es6, but no, let's make a separate language using 20 extra keywords and several unnecessary concepts called TypeScript with its own compiler.

Comments
  • 3
    If JS would have a useful implementation of Prototype-based OOP, we wouldn't need to implement class-based OOP on top of it.
  • 3
    @metamourge Probably. TBH I never worked with any other prototype-based language. But since we _can_ implement class-based OOP (in fact quite easily), there's absolutely no reason to have a transpiler for it.
  • 2
    @irene Was gonna write that, but it's past midnight here so I consider it a success if I only made that mistake (apart from drinking a coffee at 9 PM)
  • 3
    TS also adds static types, imho that's probably the best thing about it. Waaaaaay easier to work with.
  • 1
    @irene that it's an extra level of unnecessary complexity.
  • 1
    Web developers got what they deserved.
  • 1
    I am delighted in web developers’ suffering tbh.
  • 1
    Just goes to show that you have no idea what problems typescript is solving.

    Sure you can do the whole oop thing but you can also completly omit classes and go for a more functional approach which works very well and reduces the boilerplate by a huge amount.
  • 0
    @aviophile thats probably the dumbest thing I have read here so far lol
  • 1
    I've tried typescript and I admit that it's very convenient. However, most of its functionality can be replaced by the interface implementation from Pro Javascript Design Patterns (optionally extended to support properties), any class definition you see fit and proper naming conventions.
Add Comment