Too many Perls
Archive - Originally posted on "The Horse's Mouth" - 2004-11-30 05:59:54 - Graham EllisWhy do people invent new programming languages? In some cases it's for commercial reasons - they want a share of the cake and really they would be far more efficiently employed elsewhere; I guess that languages such as J++ and C# fell/fall into this category, but then that's a personal view that not everyone might share. For sure, such languages can end up being a success, but often at the expense of a different and perfectly good language that was already around.
Other languages (I think we can call Perl 6 a "new language") are a genuine move to new ground - in the case of Perl 6, taking a language that's coming up to 20 years old and using what's been learnt in those last 20 years to provide something designed for the next 20. When Perl was first written, functions like format and write were a vital part of the language and the "." operator was a natural for string concatenation.
Yet other languages fill niches. PHP is a good example; it's (?) the first language to be truly written to provide web site content rather than simply embedding an existing language in web pages or interfacing it through CGI. And the result? For the niche that it's in, it provides a really excellent solution with little compromise to other wider application area - and it's made it big as a result, now being available on about a third or worldwide domains.
PHP's success is based on the premise that it's a web language and modifications, developments and enhancements are aimed in that direction. It turns out that it's also very good for certain stand alone use, and I'll even encourage people to use it stand alone in certain circumstances but that's not its main thrust and to add facilities to the language to improve its support for a non-core use at the expense of its core use would be a mistake. I was, then, very happy to listen to Rasmus Lerdorf talking on this subject last month - to hear him say that the future direction remains the web and that the language is not looking to widen itself into a general purpose computing language. I think he's right; we already have one C and two Perls, and three Perls (one called PHP) would be one Perl too many.