News for hackers. Stuff that matters.
Re:Duck typing is safe (2020) by smt88 on Wednesday June 15, 2022 @01:09AM (#31749329)
The best apples-to-apples experiment for the value of type systems is JS vs TS.

When I write TypeScript, I have so few runtime errors that I'm often in disbelief. Sometimes I have zero runtime errors on my first test of an application.

Contrast this with my own writing of JavaScript (same coder, same runtime, etc.) and it's very clear. JS needs many, many unit tests that TS just doesn't.

Re:Duck typing is safe (2020) by ok_dad on Wednesday June 15, 2022 @03:40AM (#31750163)
Yea, I program in Python with a very strict type checking configuration, and I have never gotten a runtime error in production due to type related issues (like attribute errors or key errors), only weird edge case stuff or algorithmic mistakes.