In Search of Simplification — in Languages


I was originally going to use this blog to discuss dynamically typed languages. Everyone I talk to or read is so committed to static typing that I felt completely alone in my view. At least I did until I read the following blog by Daniel Lebrero:

The broken promise of static typing

There is a lot of discussion about the validity of the data interpretation and not about the results. Peer review in action. Even without further analysis, the experiment alone gave me pause for thought.

Personally I prefer dynamic typing. The data from the article implies that bugs that reach production are little different between dynamic and static typing. If dynamic typing was so evil, then static typing would dominate the top of the graphs, regardless of what normalisation you add. It doesn’t, so I feel happier about my preferences.

How about functional programming? Again the charts show an even distribution between functional and OO paradigms. This implies that the much touted referential integrity does not help as much as I supposed. I am sad about this since I put a lot of effort these days into isolating statefulness. Perhaps I should consider it a hobby rather than a way of improving reliability?

Daniel’s conclusion is that simplicity is the key. Look at the name of this blog. For that reason alone I want his conclusions to be right. Sadly if this were the case, Scala would fare much worse and JavaScript much better. And if it were complexity of ecosystems then Clojure, Scala and Java would not be spread across the spectrum.

I suspect that the spread is due to people, not technology. The three with the worst bug-ratio are languages used commonly in business by programmers who are doing a job. As we go up the list we reach languages that people are passionate about and therefore take more care. Of course this view is as baseless as the others. Why is the bug could for Haskell so high? Probably because passionate people are more likely to want fixes. If so, why is clojure so low?

I give up. There is no way with the limited data to make any inferences. That makes me happy – because I don’t have to feel guilty for preferring dynamic typing – or not thinking that language XXX is the best thing ever.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s