In this day and age, knowing one programming language is not enough to develop software.
Take for example web development. You need to know at least 3 different languages to write a web application:
- HTML to provide a user interface.
- A web scripting language (e.g. PHP) and possibly a general programming language (e.g. JSP + Java, ASP.NET + C#) in order to process the data entered by the user.
- SQL so that you could save the data to a database.
Of course, these are just the bare bones of a web application. More practical web apps require the developer to know more technologies:
- CSS to make the interface more appealing and manageable.
- Another markup language like XML and JSON to facilitate data exchange (e.g. for AJAX)
- A web framework to reduce the complexity of a large system.
- A scripting language to automate the build and testing of the system
Developing for corporate clients require even more technologies:
- Ways of interacting with services on other servers which, when listed down, looks like alphabet soup: SOAP, RPC, CORBA, SOA, etc.
- Various security protocols, with keys, certificates, and whatnot.
The examples above however, are not what I meant by “polyglot programming” in the title.
Instead, the title refers to an old post by Neal Ford predicting (correctly) the decline of platform specific technology and the rise of Domain-specific Languages.
But I’m beginning to see a time where even the core language (the one that gets translated to byte code) will cease its monoculture. Pretty much any computer you buy has multiple processors in it, so we’re going to have to get better writing threading code. Yet, as anyone who has read Java Concurrency in Practice by Brian Goetz (an exceptional book, by the way), writing good multi-threading code is hard. Very hard. So why bother? Why not use a language that handles multiple threads more gracefully? Like a functional language? Functional languages eliminate side effects on variables, making it easier to write thread-safe code. Haskell is such a language, and implementations exist for both Java (Jaskell) and .NET (Haskell.net). Need a nice web-based user interface? Why not use Ruby on Rails via JRuby (which now support RoR).
It’s a very insightful post. Whenever I think about this, however, I can’t stop thinking how much more worse computer colleges will become in the near future. :P