by awesomeMilou · 3y ago · 0 comments
These advanced type systems are essentially a form of pre-compile time scripting to assert certain guarantees about user defined types. It's the same mechanism that makes C++ templates turing complete.
[0] https://www.typescriptlang.org/docs/handbook/2/template-lite...
If feeling adventurous, read e.g. https://lpn.swi-prolog.org/lpnpage.php?pagetype=html&pageid=...
that's a great quote.
IIRC the type checker is literally a Prolog.