What will the world of dynamic programming languages and Web applications look like in five years? This is one of those highly personal and deeply philosophical questions best saved for after dessert is served, the drinks are poured, and the sidearms are safely locked away.
At the simplest level, the debate seems crucial. Choose the right language and new libraries magically appear because, well, the coolest programmers use the right language. The hottest languages attract the most developer energy, which usually turns into new libraries with the latest ideas.
Choosing the wrong language means filling your brains with semantic cruft that must be paged out to make room for yet another way of writing a loop. No one will be able to make sense of your code, and no one but you will care.
Still, choosing poorly saps one's energy. Some languages will be the dominant choice in certain niches. Choosing poorly means duplicating effort and looking longingly at the fast progress of others.
Commons or craft
Rob Malda, one of the founders of Slashdot, says that he chose Perl for the site because there were so many good libraries available in the CPAN (Comprehensive Perl Archive Network).
"I think Perl's primary advantage in 1997 when I original selected it was the active development occurring on CPAN," Malda explained. "There was a library for everything useful, and usually very quickly. This was critical because new technologies and versions for core functions were updating constantly."
But today, he added, "We have a much better idea of what you need for Web site building, and the tools and libraries have stabilized. All languages can handle the obvious things nice enough now."
This is a nice, politically neutral statement, but it doesn't solve the problem that in many shops, there must be only one Highlander. Only a kindergarten teacher would smile and say that all are equally good.
When a decision must be made, some believe it makes sense to go with popularity. The rich will get richer. PHP is the first language that many people learn after mastering HTML, and it will always be as comfortable as a childhood home. PHP server platforms from Zend Technologies offer better performance, making it possible to write a serious application in the language.
But will PHP be able to shake the casual structure that encourages beginners to whip up spaghetti code? Will it be able to continue to mix the presentation layer and the application layer without driving everyone insane? Will Zend's collection of server optimizations provide enough performance to overcome any limitations of the language?
Others suggest that developer passion will produce the dominant language. Perl and Python attract some of the smartest minds who see programming as a craft. Their insight and devotion to creating elegant solutions is bound to produce a great platform in two years.
Hearts and minds
The same credibility with programming hipsters, however, can scare away the bulk of programmers and limit a language to a niche. This isn't fatal, but it can come close if the masses flock to something simpler. The cool library writers can follow demand.
Some want to place their bets on Ruby on Rails, a striking and elegant solution that produces sophisticated results in no time. A few lines of code produce a full interface with all of the pages necessary to create, update, and delete records.
This simplicity often turns into shackles when the programmers reach the edge of the framework's capabilities. Changing little details or producing slightly unorthodox output can be maddening.
There are many other options. Some developers love Groovy, the dynamic language integrated with the Java API. A programmer gets the rock-solid foundation of compiled Java code mixed with the flexibility to diddle with the Java objects in real time.
All of the languages mentioned above have enough of critical mass behind them to succeed and even flourish in the future. The right answer for you will depend more on the nature of your business and the structure of your data than on whether one platform becomes cooler than yours.
Toward that end, here are 10 principles that will guide the evolution of scripting languages in the future. None of these will offer the definitive answer and save you from a long evening of dessert, liquid refreshment, and debate, but they will provide some guidance that may make the answer appear with more clarity.
1. The semantic barriers won't be as important as the languages rush to steal good ideas from one and other. The dynamic languages are blurring together faster than they're distinguishing themselves.
2. Frameworks are becoming even more dominant. Some people identify themselves as Django developers even though they're writing Python code. Ruby has been around for years, but it didn't become a rock star until it was matched with the Rails framework.
The right solution may require you to choose both a platform and the framework itself -- time to plan another evening of discussion.
3. Applications are becoming their own worlds. There are 23 job listings for WordPress developers. While the WordPress plug-ins will be written in PHP, the programmers will rely heavily on the standard set of libraries included in WordPress. Is it fair to say that the coders are working in PHP, or are they really working in WordPress?
But there are limits to this cross-pollination. "I don't see this lasting because it's so specific," said David Goodger, a director of Python Software Foundation. "A lot of graphics packages had their own proprietary language for scripting. But then it's this static thing. You don't have the advantage of this vibrant community. If you take this language like Python, you have the advantage of this well-developed tool with the well-developed libraries. You've got the best of all possible worlds."
Still, even if the applications embrace a 100 percent pure version of a language, all of the code will be dominated by the application's API. Look for languages and their syntax to remain relatively pure while the libraries define another language built on top of the first.
4. Communities will be more important. As Goodger notes, Python is especially popular in a few niches, such as the world of bioinformatics and graphics. People who work with synthetic images or DNA results learn Python to do their job. Even if Python dies everywhere else, biochemists are probably still going to be learning Python.
The power of these communities is phenomenal. When Steve Jobs introduced the iPhone, everyone began looking for Cocoa programmers again. Mike Hendrickson, the publisher at O'Reilly Books, said, "We've seen a huge turnaround for Cocoa. It was all but gone a couple of years ago. Now, there's a huge, huge increase in Cocoa because a lot of people want to develop their cool apps for the iPhone."
If Steve Jobs decides that some unary lambda calculus is the language of choice for the iPhone 4.0, the developer community is going to find a way to rationalize his selection and talk about how much they love the language.
5. The Web and the cloud are the ultimate platform. Google's App Engine sparked a huge burst of interest in Python. Perl and PHP were early favorites because they were so well integrated with Apache, a Web server that was both free and easy to configure. Tomorrow's scripting languages of choice will be determined more by the simplicity, cost, and scalability of the hosting platform, not by the purity of the syntactic sugar. Look for such tools as AppJet and Coghead by selling a cloud with a simple scripting language for building the application.
Sophisticated engines such as SpiderMonkey and V8 show that scripting languages can begin to compete with full compiled code because a smart just-in-time compiler can make guesses about the data that are often good enough.
8. All of the embedding makes it simpler for programming to escape the command line and start appearing in Web applications themselves. Some of the highly customizable platforms, such as WordPress and some Drupal plug-ins, let you add custom code in a Web form.
9. The rise of the amateurs may make much of dynamic programming irrelevant. Web sites such as Coghead (see my review), Caspio, and Microsoft's Popfly let the world do much of the programming without typing any characters at all -- unless they want to put a label on some Web form. All of the instructions for the server are communicated by mouse clicks, lines, and flowcharts. This democratization will create graphical languages that may flourish -- if the creators can make them simple enough for the average human.
10. Adaptability for modern architectures is key. David Goodger says that the Python team invests a great deal of time in improving multicore performance. Earlier versions of Pythons could handle threads, but threads were still bound to a single core. That changed after researchers with big data sets pushed for better performance that can take advantage of the hardware.