News for hackers. Stuff that matters.
Re:Do Python developers want static typing? by aszen on Sunday February 28, 2021 @12:26PM (#26295009)
On your point about compiler enforcing legitimate values, the way I see it is that if u don't get the right values from the outside world you should immediately exit the program with a nice error message.

As the data moves further down into your core functions it should become more well defined and highly structured.

Basically you should parse messy data into the types you need and then you don't need to validate the data in each of your functions.

How to enforce this is a tricky problem for the compiler, maybe it's architectural pattern that can be enforced by libraries and frameworks.

There are no comments on this comment yet.