I spend my days almost entirely developing in PHP and Javascript with the occasional trip to Bash. For the most part, the style of the code ends up looking mostly the same, object oriented PHP and a mix of OO and functional Javascript. Because of this, I’ve been researching a couple of new languages I’d be interested in testing out. Anyway, here is my list – I’d love any feedback or suggestions!
Scala
From Wikipedia:
Scala is an object-functional programming and scripting language for general software applications, statically typed, designed to concisely express solutions in an elegant, type-safe and lightweight (low ceremonial) manner. Scala includes full support for functional programming (including currying, pattern matching, algebraic data types, lazy evaluation, tail recursion, immutability, etc.). It cleans up what are often considered to have been poor design decisions in Java (e.g. type erasure, checked exceptions, the non-unified type system) and adds a number of other features designed to allow cleaner, more concise and more expressive code to be written.
So what makes Scala interesting? Personally, a couple of things stand out. First, the type system looks powerful while also being unobtrusive enough to not offend my dynamic sensibilities. I’ll butcher any explanation of how it works but this presenation does a much better job. Another interesting Scala feature is its rich support for functional programming techniques. I’m excited to try out things like currying and pattern mathing. The last Scala feature that is particularly appealing is that it can be run through the interpreter or compiled to a JAR. Because of this, it would facilitate writing simple “one off” scripts and running them through the interpreter.
Go
Go has been making the rounds on the blogosphere lately so naturally its piqued my interest. From Wikipedia:
Go aims to provide the efficiency of a statically typed compiled language with the ease of programming of a dynamic language. Other goals include:
- Safety: Type-safe and memory-safe.
- Intuitive concurrency by providing “goroutines” and channels to communicate between them.
- Efficient garbage collection “with low enough overhead and no significant latency”.
- High-speed compilation.
At face value, Go looks familiar and comfortable primarily because of its C inspired syntax and imperative style. The big ticket Go features that look the most interesting are concurrency support and its package and dependency management system. I haven’t written much (or any?) concurrent code and exploring Go’s “goroutines” seems like a great place to start. The official docs provide a great overview of the concurrency features Go exposes. Managing dependencies is painful and nothing is worse than getting stuck in dependency hell. Go has a unique approach to solving these issues, favoring convention over configuration. This post has a great rundown of why Go’s solution looks like a win.
Lua
From Wikipedia:
Lua , from Portuguese: lua meaning moon; explicitly not “LUA”) is a lightweight multi-paradigm programming language designed as a scripting language with “extensible semantics” as a primary goal. Lua is cross-platform since it is written in ISO C.[1] Lua has a relatively simple C API, thus “Lua is especially useful for providing end users with an easy way to program the behavior of a software product without getting too far into its innards.”
Functionally, Lua is a fully featured scripting language written in C which makes it a perfect candidate for embedding places where users need to be able to “script” the behavior of a program. Looking at Wikipedia, Lua has made its way into dozens of projects – including Nginx and Apache. From a language perspective, Lua looks “clean” and somewhat similar to Javascript but the most interesting feature is the possibility of embedding it into a host application. PHP also has out of the box functionality to support embedding Lua.
Anyway, that’s my list – I’d love to hear about any other languages worth checking out.