Re:Ask HN: A well-typed program won't go wrong?
by kjs3 on Monday November 03, 2014 @04:11PM
(#8553532)
I don't know what "well typed" means, but I assume you mean something like "correct use of the type system". If so, then 4 is "correct" in the sense that the type system eliminates or mitigates certain categories of programming errors, but not all categories of errors.
FWIW, I don't know Haskell, but off the top of my head in Ada if I couldn't use a subrange type, I might use a Contract (Pre or Post condition) to insure I was iterating correctly, if I thought to include one without appropriate caffenation.
FWIW, I don't know Haskell, but off the top of my head in Ada if I couldn't use a subrange type, I might use a Contract (Pre or Post condition) to insure I was iterating correctly, if I thought to include one without appropriate caffenation.