StaticVsDynamicTypes
ThoughtStorms Wiki
I've railed AgainstTyping
Possibly I'm more relaxed these days, but I still prefer languages with DynamicTypes like ClojureLanguage, PythonLanguage and ErLang
Quora Answer : Has it been shown that Haskell programs contain fewer bugs than programs not written in Haskell?
Whether it has been shown or not, it's not quite the question that you want to be asking when considering the pros and cons of a language like Haskell.
Static typing also imposes a cost on software development, but the costs of static vs. dynamic typing turn up in different places. The downside of dynamic typing is code in production that has more bugs in it. The downside of static typing is code that never makes it into production at all. (Either because developing it in a statically typed language was too onerous and someone hacked up an alternative in a less principled scripting language; or it got started in Haskell but never got all the way through the compiler)
So if you are trying to do an empirical comparison between the virtues of static and virtues of dynamic typing and you are only looking at code that has made it all the way to production then you are looking at a data set which has already been filtered and skewed in favour of static typing.
This is what seems to be the problem with most empirical research in this area. A valid comparison has to find a way to include software projects which were unfinished or abandoned to give an accurate picture.
Another way to think about it is like this. Would you rather have code that runs, but fails with 10% of its inputs. Or code that doesn't run at all?
Sometimes, no program is better than a buggy program. But in other cases a buggy program is preferable. Obviously this depends on your application; and your ability to recognise and cope with failures through secondary systems. But it's a valid "economic" decision to make.
Very strict languages like Haskell where the compiler enforces correctness all support the philosophy that no program is better than an unreliable program. But that may or may not be the profile that actually suits your needs.
Backlinks (1 items)