Full soundness in JavaScript is proven to be impossible. You can write code that no compiler can really follow the execution path.
There has been attempts in the past (https://hegel.js.org) but I think TypeScript has been successful because it is prioritizing DX and ergonomics.
In the age of LLMs, the compiler can be a lot more strict. JSON.parse should not return `any` just to make developer happy and keep moving. It should be `unknown` and force the developer (LLM really) to do the hard work of writing down the type of what that JSON _could_ return. This is the philosophy of the Sound Mode in tsz. You'll get closer to Hegel ideals without making it impossible to write code and/or promising absolute soundness that JavaScript simply can't support.
This is way more important: https://tsz.dev/sound-mode/
But I want them to make TS fully sound, which they say they’re not currently doing. Maybe one day?
Full soundness in JavaScript is proven to be impossible. You can write code that no compiler can really follow the execution path.
There has been attempts in the past (https://hegel.js.org) but I think TypeScript has been successful because it is prioritizing DX and ergonomics.
In the age of LLMs, the compiler can be a lot more strict. JSON.parse should not return `any` just to make developer happy and keep moving. It should be `unknown` and force the developer (LLM really) to do the hard work of writing down the type of what that JSON _could_ return. This is the philosophy of the Sound Mode in tsz. You'll get closer to Hegel ideals without making it impossible to write code and/or promising absolute soundness that JavaScript simply can't support.