News for hackers. Stuff that matters.
Re:Reasons to avoid static type checking by rich_sasha on Sunday January 28, 2024 @03:16AM (#39163505)
There are cars and motorbikes, and many other things. They have different benefits and costs.

Python is a motorbike. It is small, convenient, nippy, fuel-efficient. It is also terribly unsafe, holds no luggage and no protection from the weather.

Statically-typed languages are cars. Stable, safe, predictable, require a lot of infrequent maintenance, weather-proof. Not convenient in heavy traffic, but hey, you put on the heater seats and the stereo and you don't mind queuing.

Now, I find the effort to add typing to Python like trying to make the motorbike safe. You double the wheels to have a full 4-wheel vehicle, add a roof and windshield... And you end up with something that has th upsides of neither a car nor a motorbike.

Where people find it convenient, sure. But the evangelism of "types everywhere" seems to not get it.

Re:Reasons to avoid static type checking by petesergeant on Sunday January 28, 2024 @03:57AM (#39163735)
To steal someone else’s comment from above, I feel like TypeScript has disproved this, and that you lose almost nothing and gain a huge amount with a high-quality optional typing system
Re:Reasons to avoid static type checking by rich_sasha on Sunday January 28, 2024 @09:39AM (#39166188)
Maybe. I don't use typescript, and rather this is my impression of state of things in Python.

Anything, including gradual typing, can be done well or not well.