Tuesday, November 1, 2011

This is how computer software evolves

Legacy software, so goes the old saying, is any software that actually works.

Of course, there is a fair nugget of truth to this aphorism, for once a system is running we start to be increasingly unwilling to change it.

Yet software is soft for a reason; it can be changed, and it can be improved.

It's always interesting to watch this process at work, for the improving of software can be a messy business, not just for technical reasons, but also because of social, cultural, and business reasons.

Today's exhibit: JavaScript, now venerable, but not so long ago it was the newest language on the Net. JavaScript has always had a history of strife and tension when it comes to how to upgrade the language, and has suffered through its bumps and bruises.

A major event recently was Google's decision to take a new direction with their proposed new Dart language. As Weiqi Gao observes, this has grown into quite the discussion, with some backers wanting to continue to improve JavaScript, while others feel that it's time to embark on designing a new language (such as Dart). Major discussion has ensued, and some of the emotions have been rather heated:

I respect the people involved and believe they’re for the most part making their own choices. But Dart and other unrelated Google agenda items do impose clear and significant opportunity costs on Google’s standards actiivities.
"Unrelated"? I think that is an overly strong critique. Surely Dart is strongly related.

What is the best way, then? Continue to improve the existing language, or work on building new languages? Can we really not do both? After all, Dart is not the only new language built on top of and closely related to JavaScript: consider CoffeeScript, for example. It is another new language which is designed for the web, and is implemented by being compiled into JavaScript. CoffeeScript is interesting; it pushes the envelope in other directions, such as borrowing the "whitespace is structure" paradigm from Python (a technique I've always found fascinating, even if I can barely manage to maintain decent indentation standards in my own code).

I think such experimentation with new languages is wonderful, which is why it's so great to see techniques such as Source Maps, which allow tools like IDEs and Debuggers that were written for one language to be used, in a semi-interpreted style, with other newer languages built atop those old languages. Clever!

So, just as Weiqi Gao does, I applaud the invention of these new languages, and I hope the experimentation continues. And I applaud the improvement of compilers and VMs and language runtimes, to enable such language experimentation and innovation. Even though I continue to earn my living coding in Dennis Ritchie's good old C language, all these new ideas and new approaches help us all think about problems in new ways, and find better techniques to solve problems.

It is, as the kids say, all good.

No comments:

Post a Comment