If you’re a programmer, you’re knowledgeable about “big” languages such as Java andC++. But what about those little-known languages you only hear about occasionally? Which ones are valuable to know?
When it comes to capabilities, Erlang is a big language, used in high-performance, parallel systems that scale. It was originally created by Ericsson to serve its telecommunications functions, but eventually became open source. While it features a nice array of libraries supporting telecom standards, it has grown far beyond telecom; for example, the Riak NoSQL database is written in Erlang.
But Erlang isn’t for the faint of heart. If you come from the “curly bracket language” (such as C, Java, PHP) background, as so many of us do, the language might look quite foreign to you. Indeed, here’s some sample code, which comes from the online tutorial:
This code declares the file to be a module called “dice.” Then it states that the module will provide a function called double that’s accessible to users of the file (i.e., it exports the function). Then it provides the code for the function. The first word is the function name, followed by the parameters the function takes (in this case, an X). The part after the -> is the function’s code: it returns 2 times X.
Getting started in Erlang isn’t particularly easy either, as the documentation is big and somewhat hard to navigate. Check out the aforementioned tutorial for getting started. But this isn’t a language you just pick up and use here and there; it’s the sort of thing you learn if you want to build big, scalable, fault-tolerant applications. You’ll have to do some work to learn it, but the payoff could prove worth it.
R has been around for almost 20 years; for many of us, it was a niche language used primarily by statisticians. Although statistics remains its strong point, more people are taking notice of it for broader data-analytics applications. Some large companies have been using it for quite some time, because it helps analysts quickly isolate trends.
The language supports mathematics in general. On its Wikipedia page, you can find a great example of how to generate an image of a complex Mandlebrot set in little more than a dozen lines of code. One of the code statements looks like this:
R includes support for complex vectors; also look at the syntax and how the parameters are named in the call. If you want to solve some ordinary differential equations, R is your language. But it’s not a language you would use to build a Web server. Its prominent place in the statistics and mathematics communities means that, if you become an expert in it, you’ll quickly find a home.
I’ve always found the D language’s name somewhat amusing. Supposedly C was so named because it was a follow-up to B. Years ago, one of my computer science professors said that the B language was named for Bell Labs, which is a dubious claim, as B was a follow-up to BCPL and perhaps just a shortened version of the latter. Either way, it made sense to name the language that followed B as C; now we have D.
Unlike the previous languages I described, D looks a lot like C++. It has the usual friends like:
But D strays from C++ in a lot of ways. For example, it supports properties, which are a step beyond member variables, allowing you to provide functions that get called automatically when you read or write to the property. (In C++, you can fiddle with operator overloading to create a “set” property, but properties aren’t directly built into the language.) The D language page includes a page proudly proclaiming that D is better than C++; on it, there’s an example of properties like so:
Both of property’s accessors, set and get, are just functions that get called, but then you can access them via a simplified syntax like so (again from the D page):
The language also has other modern features such as garbage collection and concurrency. It’s getting more traction, which could make it important to know in coming years.
Scala is something of a response to Java. Java was created in the early 1990s and became extremely popular very quickly. Today Java continues to top the charts in language usage, but it’s far from perfect, despite new versions that have fixed many earlier shortcomings. In 2003, those flaws led some programmers to design a whole new language, Scala, which compensated for at least some of Java’s issues.
Scala provides support for functional programming and higher-order functions while maintaining an object-oriented approach and a strong typing system. If you’re interested in a quick overview of the functional aspects of Scala, the first answer on this Stack Overflow question is an excellent summary, along with this page on the official Scala website.
When Microsoft first introduced F#, it was first treated with great fanfare… before sort of fizzling out. People largely ignored it. But, in the past two years, people who program for Windows have started embracing it again, and it has picked up some steam. Originally similar to OCaml, but created to target the .NET runtime, F# bears some similarities to C#, as well.
At heart, F# is intended to be a functional-first programming language, but it’s also a general-purpose language that includes objects that are built on top of the .NET runtime. Because it’s built to support .NET, it boasts support for the fundamental object types included in .NET (such as Unicode strings). The language is supported by an open-source community and the nonprofit F# Software Foundation.
Remember, just practicing a language isn’t the same as becoming an expert programmer in it. Expertise takes time and dedication. But if you’re interested in the niches that these up-and-coming programming languages serve, that effort could really pay off with steady work and solid compensation.