|
|
|
|
|
by TorbjornLunde
2413 days ago
|
|
TypeScript's complexity comes from trying to model typical JavaScript patterns using a compile-time type system. It turns out trying to model a dynamic language's typical usage at compile-time is lead to some complicated stuff. Personally I think it's mostly worth it since most of that is hidden behind API-boundries or (more commonly) in type-definition files and your own code typically either has really simple type annotations or is inferred (i.e. not explicitly type annotated). But I see your point and it does sorta feel a bit C++-like in this respect sometimes. |
|