2 ms·
> I much rather blame the type system designers Your comment may (or may not) be a reasonable criticism of designed-from-scratch languages, I don't really know
by lucideer 4y ago
> I much rather blame the type system designers
Your comment may (or may not) be a reasonable criticism of designed-from-scratch languages, I don't really know for sure, but either way none of it applies whatsoever to Typescript.
Typescript is by definition an imperfect and over-complicated typed system because they have set themselves the task of levering typings onto a mature (i.e. "has legacy issues") language that was never designed with the intent of being typed.
It's even "worse" than similar cases like PHP, where after many versions the core devs have begun slowly implementing weak types on top of the previously-untyped language, because at least they have the luxury of being the core language devs and having the power to deprecate & change APIs if they choose. ECMA have no intent to type JS, nor to do anything explicitly to make life easier for the Typescript project.
Despite all the above, Typescript is brilliant because the unnecessary complexity is not layered, it's feature-based. Best-practice features of JS are easy to type in TS. If you're struggling with complex TS features, you're either writing a DefinitelyTyped package for a pre-existing project, or otherwise it's probably a strong hint that you're doing something wrong.
- lmeyerov 4y agoOne project I'm particularly thinking of here was around the weakness & stupidity of the type system, and major issues around scaling (federated code evolution), for what was intended to be carefully typed ecosystem code. The JS aspects had very little to do with it.