3 ms·
> Most bugs are about types, just most languages’ type systems are too weak to express the logical types relevant to many important bugs Ok, so you are writing
by flavio81 9y ago
> Most bugs are about types, just most languages’ type systems are too weak to express the logical types relevant to many important bugs
Ok, so you are writing a function for a fast approximation of ATANH using IEEE floating point standard.
In type: IEEE floating point number
Out type: the same.
The function will report an incorrect value (bug), yet still be perfectly type safe.
Tell me how the magical type checking of the super-good-type-system programming language you propose will catch the error and thus prevent the bug.
And also, we're discussing about real-life problems, tackled with existing programming languages, not languages that don't exist yet.
Not even Haskell, with it's great type system, will help you in such cases. Not in the bugs that are caused by a flawed understanding of the business model, the business rules, or of the system as a whole.