Are there (m)any other languages with type systems as flexible and powerful as Typescript's?
Yes there are. For instance Idris ( https://www.idris-lang.org/ ) has a way more powerful typesystem than Typescript. If you are looking for more practical and less academic languages, then Scala would be one of the languages that technically has a more powerful/generalized typesystem but at the same time is harder to use compared to Typescript's and cannot do some things that Typescript can do.
Extreme explorations of TypeScript's type system
61–64 of 64 posts
Re: Extreme explorations of TypeScript's type system
#62Re: Extreme explorations of TypeScript's type system
#63Advanced type systems are fun to play with. But unfortunately some people get carried away and build a mountain of unnecessary complexity that other developers then have to deal with. A bit like Lisp macros. It is fun to implement your own type system and DSLs in Lisp. But the result is likely to be completely unmaintainable by anybody else and yourself a year later when you have forgotten how it works. I have seen t…
There are lots of Lisp DSLs using macros which have been maintained by different people over several decades.
Re: Extreme explorations of TypeScript's type system
#64> If you do find a need to use type operations, please—for the sake of any developer who has to read your code, including a future you—try to keep them to a minimum if possible. Use readable names that help readers understand the code as they read it. Leave descriptive comments for anything you think future readers might struggle with. Also, as you start getting complicated logic in your types, you need to test your…
https://github.com/cypress-io/cypress/blob/develop/cli/types...
[0]: https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type