Polyglot programming -- development in multiple languages

When I ask developers "what programming language do you use?", the answer I often get is a single language.  Most developers define themselves as a Java, C++, Delphi, C#, Visual Basic, PHP, Ruby or Python developer.  Some web developers will say they use JavaScript.  In fact, most developers use several programming languages.  Who doesn't also use JavaScript, HTML, XML, WSDL, SQL and other languages (domain specific, procedural, markup, functional, object-oriented, etc.)?

To build web applications developers need to leverage a server-side language like PHP, Perl, Python and client-side language like JavaScript.  To build enterprise business objects many developers will choose to use Java, C++ or to wrap legacy systems with SOAP and RESTful web services.  In systems with multiple processors and multiple cores some developers are now using functional programming languages like Haskell, Erlang and Scala.

Neal Ford, Software Architect and Meme Wrangler at Thoughtworks, (in his blog post on December 5, 2006) calls this use of multiple programming languages "polyglot programming".  He says, "Now, increasingly, we're expanding our horizons. More and more, applications are written with Ajax frameworks (i.e., JavaScript). If you consider the embedded languages we use, it's even broader: XML is used as an embedded configuration language widely in both the Java and .NET worlds."

There is also a website focused on polyglot programming.  The website is "dedicated to exploring the benefits (and drawbacks) of combining multiple programming languages and multiple "modularity paradigms" in application development. The "paradigms" include Object-Oriented Programming, Aspect-Oriented Programming, Functional Programming, etc."

What combination of languages do you (or should you) use in most of your application development?  Is there a perfect language combination for all of your work?    Depending on the requirements, you will at least consider a mix of four language choices: an object-oriented language, SQL, a markup language and a scripting language.  There are many articles and conference presentations describing the "right language for the right job".

Several examples of polyglot programming are listed on the Polyglot (computing) Wikipedia page:

Sadek Drobi, in an InfoQ article, discussed "Paradigm based Polyglot Programming".  "To be able to do the right decision one should keep in mind that the main reason of adopting polyglot programming is to be able to choose the right programming language for the domain problem at hand. But then, the question is how to choose the right language for a given domain or sub-domain?"  He guides developers to take into consideration the properties of each programming language, the paradigm (or paradigms) that a language embodies and to choose the right languages for the application domain or sub-domain.

For native code development, you can (often) link code from several compiled language programs to create executables, libraries and dynamic link libraries or shared objects.  For managed code development, the byte-code based Java and .NET virtual machines both support multiple programming languages.  When you need to mix programming and scripting languages you will often have to use multiple runtimes.  Does this sound too complicated?  Years ago, developing and deploying applications built with multiple languages required a team of software developers.  Today, we don't think twice about leveraging multiple languages in our every day development work.

What programming, scripting, domain specific and markup language combinations do you use?  Post a comment below.

Programming is Life!

Recent news for developers:

Swine Flu Emergency Should Put IT on Alert

Android 2.0 SDK is released

Thinking Functionally In Ruby

Software That Gets Reduced, Reused, Recycled

Software That Fixes Itself

8 Awesome Mashups Made Possible by APIs

Interview with a Digg.com Software Engineer Kurt Wilms

World's Smallest Computers Made of DNA and Other Biological Molecules Made to 'Think' Logically

Healthcare Information Integration

Most Enterprises Lack a 'Real-Time' Strategy

Ubuntu Linux 9.10 'Karmic Koala' Starts Its Climb

David Intersimone (David I) is the Vice President of Developer Relations and Chief Evangelist for Embarcadero Technologies. My company blog is at http://blogs.embarcadero.com/davidi

Copyright © 2009 IDG Communications, Inc.

7 inconvenient truths about the hybrid work trend
Shop Tech Products at Amazon