nikhil.io

The Collatz Conjecture in TypeScript’s Types

The argument here being that, since the ‘general form’ of the conjecture is undecidable, TypeScript’s type system is undecidable. How does one even think of doing these things?

I love Typescript, but it isn’t nearly ambitious enough. It would be vastly improved with an --extremelyStrict flag enforcing that your Typescript code is free of side-effects; that is – no Javascript code is generated at all. Real programmers do all of their computation within the type system. Otherwise, they can’t be sure their program will work in production and should be duly fired.

Mad Lad. Via HN. (Cached)