The One True Language

LMAX Exchange

Lawrence Kesteloot has an excellent post Java for Everything.

About a year ago, though, I started to form a strange idea: That Java is the right language for all jobs. (I pause here while you vomit in your mouth.) This rests on the argument that what you perceive to be true does not match reality, and that’s never a popular approach, but let me explain anyway.

There are two key realisations that are vital to understanding why this argument has merit and the first one is right there in the introduction: what you perceive to be true does not match reality. As Lawrence notes:

The problem is that programmers perceive mindless work as painful and time-consuming, but the reality is never so bad. Here’s a quote from a forum about language design:

It really sucks when you have to add type declarations for blindingly obvious things, e.g. Foo x = new Foo().  @pazsxn

No, actually, typing Foo one extra time does not “really suck”. It’s three letters. The burden is massively overstated because the work is mindless, but it’s really pretty trivial.

Every developer knows the mantra that code is only written once but it’s read many times, yet we focus on the number of keystrokes required to do something or the number of lines required. Besides which, the time required to type statements is almost never the limiting factor for how fast code can be written  it’s almost always dwarfed by the amount of time required to think about what the code should be doing and how it fits into the architecture.

The second key realisation is how powerful consistency is:

This focus on a single language has had an interesting effect: It has encouraged me to improve my personal library of utility functions (teamten.jar above), since my efforts are no longer split across several languages. […] I can now confidently invest in Java as an important part of my professional and personal technical future.

Being consistent in your choice of language allows you to learn it in much greater detail, become more familiar with a wider range of its available libraries and idioms and get a big return on investment when developing tools or libraries to pave over any rough spots.

None of this implies however that different languages aren’t better suited to different tasks. It just means that the benefits from switching languages is generally overstated and the costs generally understated. Thus, it should be far less common for switching languages to be worth it.

There are times when switching languages makes a lot of sense. For example, if your one true language in Java and you need to write code that runs in a web browser, Java is such a poor fit that it is worth switching languages.

Similarly, it doesn’t have to be Java that’s your one true language C# would probably make more sense if you primarily worked with Windows environments and C would be better if you were a kernel programmer.

Ultimately it’s not so much about what choices you make, rather that it’s about correctly weighting the factors that go into those choices. We need to be aware of the innate bias we have towards overvaluing the elimination of immediate pain and undervaluing longer term benefits.

Any opinions, news, research, analyses, prices or other information ("information") contained on this Blog, constitutes marketing communication and it has not been prepared in accordance with legal requirements designed to promote the independence of investment research. Further, the information contained within this Blog does not contain (and should not be construed as containing) investment advice or an investment recommendation, or an offer of, or solicitation for, a transaction in any financial instrument. LMAX Group has not verified the accuracy or basis-in-fact of any claim or statement made by any third parties as comments for every Blog entry.

LMAX Group will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information. No representation or warranty is given as to the accuracy or completeness of the above information. While the produced information was obtained from sources deemed to be reliable, LMAX Group does not provide any guarantees about the reliability of such sources. Consequently any person acting on it does so entirely at his or her own risk. It is not a place to slander, use unacceptable language or to promote LMAX Group or any other FX and CFD provider and any such postings, excessive or unjust comments and attacks will not be allowed and will be removed from the site immediately.