4 ms·
Does TypeScript have the most complex and advanced type system ever?
by goto11 5y ago
Does TypeScript have the most complex and advanced type system ever?
- mariodiana 5y agoThis is a compound question, since complexity and advancement are two separate issues.
- paulddraper 5y ago"Advanced" is debatable, but yes to "complex". At least, in the core language itself, not counting extensions (otherwise Haskell). EDIT: I will say that it is a pleasant surprise how flexible and practical TypeScript's type system is. It would seem that the pressure of working for existing untyped programming patterns has produced something that is very usable and unobtrusive.
- sime2009 5y agoNo, Scala does.
- sp33der89 5y agoI've read a lot online that Scala is complex, but I had an easier time with learning Scala than I had reading through the TypeScript docs. And I dived into TS after Scala. Except for implicits ha.
- ParoxysmalVigor 5y agoTS is the most ergonomic and flexible type system i worked with. It has some deep quirks, but end-user app developers rarely have to do anything with those. Miss it a lot when i have to push some python or golang code.
- pornel 5y agoIt depends how you interpret these things. On a technical level, TS is not sound (you can have runtime type errors in programs that have "correct" types according to TS). For type system aficionados that may not even count as a proper type system.
- aaomidi 5y agoTons of programming languages strip the types for runtime. Notably java.
- Quekid5 5y agoYou're thinking of type erasure. That's very different from soundness. (but is in fact correct that Java's type system isn't entirely sound, I forget the details, but I believe array element type variance is one of the soundness hole.)
- hebrox 5y agoUsing something like TypeBox [1] can help with that. [1]https://github.com/sinclairzx81/typebox https://github.com/sinclairzx81/typebox