I am currently interviewing people for developer positions for my startup (PaperLnx) and as I presented my plans to use multiple languages to one of the candidates he immediately retorted with "why on earth would you want to do that?"

Why indeed?
 
As I mentioned in the previous post about F# and Erlang it seems to me that the age of "one size fits all" is ending  in a lot of areas. I think that it is also happening for languages.

When .NET was announced, one of the messages by Microsoft was that .NET is the platform and that you can choose any language you want to develop in it. Microsoft also worked with partners to back up this statement and  release a lot of languages for the platform (e.g. Eiffel#, Fujitsu NetCobol  etc.) vs. Java which was a single language with a "write once, run everywhere" vision. Microsoft itself released 2 manages languages VB.NET C# and managed extensions for C++. The C++ managed extensions were very awkward to work with  and only people  who really had to use it. the non-MS languages seemed to be niche languages for legacy integration and not much more. VB.NET (we're talking .NET 1.0 here) seemed like something to try to distract VB heads while Microsoft was pulling the rug beneath their legs. Which basically left C# as the only viable language to develop in if you were serious about .NET (at least in my eyes). The "many languages" vision seemed like something to hide the (obvious) fact that Microsoft had to come up with an answer to Java (especially since around the same time Sun also sued Microsoft over the J++ and JVM implementations)

5-6 years later the situation is a little different. For one, we see that the JVM is not just about Java anymore. Just like the original .NET vision, the JVM has become a platform supporting many different languages Jython, JRuby, Scala, Groovy etc.
The .Net platform is also getting more interesting  languages like  Boo or   Gardens Point Ruby.Net . .NET is also being extended by Microsoft itself (with IronPython, IronRuby, F# ).

Two interesting things we can see are one, suddenly the languages are cross platform. e.g. I can program in python and deploy it natively, .NET or on a JVM - so in a way you get some platform independence.

The other and more significant issue (in my eyes) is that the languages available on each platform are different enough in meaningful ways - to a point where it is getting worthwhile to use more than one language in projects. Here are few examples from around the blogsphere that demonstrate this:
  • Neal Ford shows an example using the (excellent) Mocha mocking library (in JRuby for testing Java classes. So the dynamic properties of Ruby help make the testing simpler for the statically typed Java.
  • The BOO Build System (via Ayende) - which is about building a DSL for builds (a la rake). again we see taking advantage of the properties of a dynamic language this time to help with .Net languages.
  • (not) Dennis Byrne shows how you can call Erlang from Java - which demonstrate taking advantage of the concurrency features of Erlang from Java.
When it comes to the difference between general purpose languages (i.e. Java, C#, VB.NET) we mainly see syntactic nuances. When it comes to dynamic languages vs. static languages vs. functional languages etc. the differences are more meaningful. What has changed now is that both platforms and open standards (e.g. REST over HTTP/WS-*) enable better integration and increase the motivation to use the "best tool for the job" approach over "the everything looks like a nail" approach .

I think the time for language pluralism is ripe - In my solution this would probably translate to a mix of C/C++, F#, C# and Ruby - What about your projects?


 
Wednesday, October 24, 2007 4:56:51 AM (GMT Standard Time, UTC+00:00)
Absolutely right. I think it will be more common to mix static/strong with dynamic for "glue" in a typical app. Functional is an interesting one, and it a longer term trend I think.
Wednesday, October 24, 2007 7:53:16 AM (GMT Standard Time, UTC+00:00)
Excellent post,
What you are trying to do is what every single development shop should do: Find the best tools, technology (including language), resources (human and not human) to build a succesful product.
But normally you find the constraints of working in an enterprise: budget restrictions, company philosophy (we are a java shop, for example), existing available human resources, client requirements... I had a boss that told me that technology projects are 'opportunistic'. I disagreed, but today I think he was right.
If you have the chance to start from the scratch controlling budget, resources and technology I would try your approach. But on a JVM instead of a CLR... I'm a Java man ;-)
Diego
Wednesday, October 24, 2007 12:56:20 PM (GMT Standard Time, UTC+00:00)
I've tried the multiple languages approach and thought it was a failure. My current view is: simplify. At our current firm we use one primary architecture (web apps) and one primary language (Python). At firms where we used multiple languages (Java for most stuff, C++ for performance-sensitive analytics and Perl for scripting/glue code) we wasted so much time on integration between different languages that the perceived benefits of "the right tool for the right job" were quickly lost.

With one language, that's not a problem - you get great reuse and great integration between different components. Add to that the fact that everyone on the team is skilled in the same language, and the team's productivity gets a real boost. You can move people from one are to the next without incurring a ramp-up cost on refamiliarizing themselves with another language.

In theory, .Net would give you the best of both worlds: a choice of languages suited for the job at hand, plus great integration between the languages via the common assembly format. But you really need to plan for that as there are some subtle differences between langagues (named arguments in VB.Net). And you still don't get the team benefits of a single language as a VB.Net programmer might not be that much help in supporting a C# component.

At least, that's been my experience...
Wednesday, October 24, 2007 1:29:11 PM (GMT Standard Time, UTC+00:00)
@Diego - The current platform offering in Java is IMHO a little more compelling for me since JRuby is more mature than IronRuby- however in Israel .Net is more popular which tipped the scale for me.

@David - Maybe I didn't explain that very well - but I my personal experience is mostly with solutions that need more than a single language anyway - I did C++ and Java, C++ and C#, Matlab + C + C#, Foxpro + J++ etc. As you noted the integration experience is less than stellar. However the interesting fact that both .Net and the JVM are growing and maturing as multi-lingual platforms.
Different teams within the developing organization have different needs anyway - if we can use open standards on one hand (e.g. web-services ) and binary compatibilities on the other (e.g. .NET platform) we can get a better multi-lingual experience than before.
Also The choice to use more then one language would be when the languages have distinct advantages that make the exercise worthwhile - for instance, I would not use VB.NET and C# since the languages are actually very close .

Arnon
Wednesday, October 24, 2007 2:31:14 PM (GMT Standard Time, UTC+00:00)
@Arnon - In Spain I think there are much more Java developers than .NET developers, but the profile of the projects is completely different. Java is used by big corporations and more complex projects, and .NET is focused on small companies and not-so-complex projects.
Comments are closed.