Sunday, September 03, 2006

[Misc] Does it matter to know more than one language?

This weekend I've read two interesting articles. The first one from Joel Spolsky with the title “Language Wars” discuss the usefulness of the ever raging discussions between software developers about the “right” programming language. Besides that he admits that this kind of discussion is definitely fun, but if you want to develop a production quality system the decision depends on the maturity of the language (and tools) and the skills of your team.

The second article is from Luke Plant titled “Why learning Haskell/Python makes you a worse programmer”. He describes his experience of using concepts of not so common languages at daily work. His conclusion is, that, not surprisingly, it comes to very bad results if you use as example sophisticated functional language idioms inside code which does not support the underlying concepts.

In the real world, knowing a lot of languages gives you definite advantage. But, and this is my question, is this so clear for programming languages?

Learning a language needs a lot of time and most of all, it needs practice. Most professional software developers only use one (or at most two) languages for their daily work and they speak them fluently (that's why they are called “profession” ;-). In our days, this are Java and sometimes C#, a decade ago this was mostly C/C++. The tides change so it is out of discussion that a developer learns more than one language in his life (at least I know one who knows someone who knows Fortran). Today, there are a lot new languages on the surface, some really new, such as Ruby, some rediscovered, such as Erlang or some which were around us but nobody noticed them (Python). There are also a lot of mere academic languages, such as the upcoming Fortress and Scala. And there are all the rumours about Domain Specific Languages.

New languages may have features you want to use, which are so sophisticated and elegant that you never want to see braces, but makes it sense for your daily work, and the quality of it, to learn one of them? There a to different views to this: for geeks and developers, it makes absolute sense to to this, learn new concepts, write little and shiny programs and have some fun to explain your knowledge to the “unliterated”. But for your project and your company, it can make no sense at all, it can, as Luke Plant describes it, be a waste of time. As example, Java and C# have are easy to learn languages but to use them in a productive and professional way needs a lot of time, besides nobody will ever know all features of their frameworks. So for your daily work, it may be the best to practice what you already know, develop useful idioms and patterns and read about knew concepts in your language, such as Generics or LINQ, and learn to use them to build readable, testable and stable code. It may be possible that you are someone who is skilled enough to speak more languages fluently and you can practice, but most of us developers are not (mostly because of practice).

For me personal, it makes sense to learn other languages because they can teach you new ideas and concepts and it is at least possible to practice if your take part in some open source projects or build small tools for your personal use. On the other hand, at work you need every bit of knowledge you have to develop a good piece of software, so every experiment can be harmful.

 

4 comments:

Alexander Schatten said...

I think this is a very interesting question: I would like to mention two things:

First of all, we should distinguish between platforms and languages: This is again a probably nice topic for our BLOG: e.g. Sun "bought" a Ruby developer and wants to support Ruby (among others) to work within the Java VM.

I think this is an important thing (allthough nothing really new, see for exampe Jython or Groovy). However, it shows, that different problems might legitimate different languages.

The second point I want to emphasize are domain specific languages.

I personally believe, that this will become one of the next "big things": languages like Java are "general purpose" languages, but this also imposes too many options for a domain programmer. If a specialist develops a DSL for a specific domain, say, for developing persistence mechanisms for web-applications; the web-developer could use these high-level languages to solve the specific domain problem (persistence in that case) without the need to be aware of the specific libraries (e.g., Castor, Hibernate, Cayenne, ...).

Alexander Schatten said...

Additional comment to Joels article:

I more or less agree with most of his statements. However, I think he misses one very important point: the selection between e.g., Java and .net or Python is not only a matter of developer knowledge.

There are serious policies you have to be aware of. As soon as you enter .net you are "caught" in the Microsoft world. With all advantages but also serious disadvantages. You have to be aware of that.

Thinking of the other choices (particularly Java), you have a broad variety of available rather independent options (JVMs, frameworks, support companies...).
And most of the importnat tools and frameworks come with Open Source license.

So the basis for the choice is knowledge, available platforms and (very important from my point of view) the question if you want to be bound with your business or projects to the decisions of one company...

rmeindl said...

You are right, platforms and languages have to be separated. Languages will matter less than the platforms and their ecosystems in the future. Microsoft actively supports the porting of different languages to their platform, the CLR. The CLR provides most of its functionality by the CIL platform while the JVM needs a capable compiler to produce useful byte code so more work was done on the CLR side (maybe this will change with Java 6). Both systems has shifted the abstraction level up and away from the system specific level, which will be one trend in the future, there more and more complicated things, such as distributed and transactional processing take place (e.g. Terracotta) (the other trend is represented by small, service oriented devices).
In the last two years, it is en vogue again to think about more alternative languages. Some are multi purpose languages others are ports of existing (or rediscovered) ones or try to test new concepts, such as Scala. Domain Specific Languages have the purpose to support a narrow field of development as well as possible. Examples for DSLs are the well known SQL or Rake. There are also ideas to build tool kits to create custom languages on the fly, such as the Jetbrains MPS system. Joel's company use a home grown DSL (Wasabi) to build their products, I build some years ago one to create Lotus Notes programs. So yes, DSLs will have their place, but I don't think they will replace the full featured multi purpose languages as C#, Java, C++ or Ada. A DSL allows the developer to model on the level he knows best, the language.

Alexander Schatten said...

I completly agree with Rupert. However, I think that there is a new movement on the way with systems like Open Architectureware:

Developers can here create DSLs "on the fly" as needed for a specific domain problem. This can help in partitioning problems to people with specific skills.

E.g.: The guy who has good platform knowledge can define the DSL and the required transformers, whereas the people who have good domain knowledge can use the DSL and need not worry too much about (platform) implementation details.