3 ms·
> Typescript doesn't necessarily make your code any more stable than equivalent vanilla JavaScript that validates function arguments properly I don't agree. 99
by friedman23 5y ago
> Typescript doesn't necessarily make your code any more stable than equivalent vanilla JavaScript that validates function arguments properly
I don't agree. 99% of javascript/typescript programs will be dealing with data that is potentially null and without strict compile time type checking that typescript affords writing correct javascript programs is almost impossible.
- Zababa 5y ago> without strict compile time type checking that typescript affords writing correct javascript programs is almost impossible. It's tedious but it's far from impossible.
- friedman23 5y agoWithout an automated system telling you where to add checks for possible undefined values I think it's actually impossible in practice.
- Zababa 5y agoI think it is very possible. There's a simple technique for that: check everything, all the time. As I said, it's tedious but it's far from impossible. You can probably optimise it by checking less things in practice.