Sunday, February 17, 2008

Winning the battle but the war rages on: Static Vs. Dynamic Languages

Dynamic languages are getting A LOT of popular press at the moment, in the face of a wave of supposedly superior dynamic languages like Python, Ruby, et al, what is a poor static language guy like me supposed to do.

It seems everyone has forgotten that C++ is still the king of languages, closely followed by C#/Java (let's stop pretending: it's one language! - lol).

But the curly bracketed languages are in for a thrashing at the hands of the dynamic hippies, and not only because their languages sound cooler. Somewhere everyone got confused, and seems to think a dynamic language is a more practical one.

I like dynamic languages when I am prototyping and working quickly; they are quicker, cleaner and more direct. But whoah betide the person who tries to run a project of 10+ developers of middling quality with a dynamic language: get ready for code grid lock.

Why is this? Dynamic languages are great, if you have a Ph.D. in Comp Sci, and sadly the people who advocate particular patterns, practices and languages tend to, or at least have a computer literacy at that level. But not most developers. Most developers aren't superstars, they are code monkeys, and they WILL get confused in time, have the data types incorrectly implicitly data convert at runtime and the code will break.

Just this morning I was faced with a classic bug of developer stupidity; the application attached events to the Event Log in Windows, but the guy did a count of the event log for some business conditioning. So when you clear the SYSTEM event log, his code and the application breaks; meaning until SQL server or some other handy app writes to the Application Event Log, his vital process application WONT RUN. Why? Because he was a moron who ASSUMED that that the event log will always have a x > 0 length; ROT!

That is the sort of banal assumption that the compiler in static languages is able to generally remove; but in the brave new (old) world of dynamic languages will become the sort of bug a manager will have to become familiar with.

Labels: