2 ms·
I don't use them directly much, but template literal generic and contidiontal types is probably the closest a mainstream language has inched towards dependent t
by magnio 2y ago
I don't use them directly much, but template literal generic and contidiontal types is probably the closest a mainstream language has inched towards dependent types.
Some examples of TypeScript power:
- SQL database in TypeScript types: https://github.com/codemix/ts-sql https://github.com/codemix/ts-sql
- Statically typed raw SQL queries: https://github.com/andywer/squid?tab=readme-ov-file#tag-function https://github.com/andywer/squid?tab=readme-ov-file#tag-func...
- (Someone fill in your TS hackery for me)
- Vaguely2178 2y agoThere are various programming language interpreters that run entirely in the type system: - BF: https://github.com/susisu/typefuck https://github.com/susisu/typefuck - Assembly: https://github.com/judehunter/ts-asm https://github.com/judehunter/ts-asm