Re:The Anti-Human Consequences of Static Typing
by pogden on Monday August 12, 2013 @05:01PM
(#6201878)
But most statically typed languages let you represent that kind of code. C++ and Java have null. Haskell has Maybe. It doesn't prevent you from writing the code, but rather requires you to be explicit about what values a variable can take, which is the purpose of having a type system at all.
[ Parent
| on HN ]
Re:The Anti-Human Consequences of Static Typing
by pdonis on Monday August 12, 2013 @06:07PM
(#6202445)
It doesn't prevent you from writing the code, but rather requires you to be explicit about what values a variable can take, which is the purpose of having a type system at all.
It's the purpose of having a static type system, yes. But the drawback is that you have to be explicit; you don't have a choice. There are situations where that is indeed a drawback; see my other posts in this thread.