In a fast paced business environment with fast changing requirements, the tools for expressing and constructing a program become extremely vital for the productivity of the programmer. Given this assumption, the primary of these tools, the choice of programming language becomes extremely essential for productivity. Having worked in C and C++ and having seen a host of different languages I have formed a vague idea of where I am headed next. My attempt is to find out which language should be my lingua-franca of programming.
I am a clear advocate of the horses for courses philosophy, however, it is also important to work with a language that best shapes my thinking. I have here a list of languages I am acquainted with and hopefully a choice emerges and hope that one of these quickly becomes an arrow in my quiver (that I am able to build at least something substantial and useful with it). I had scribbled down the following languages and their pros and cons and hope to master one of them by the end of the year (a 10000 hours later…). Each of these languages have already been used in production and proved their value well already for other companies.
Here is my humble attempt to deconstruct the pros and cons of each language and use one of them before jumping headlong into one.
The grand daddy of all the “Programming in the Large” languages. In spite of its quirky syntax (read non-C typish), it is a revelation to work in a language where there is no mutability. In fact, once I worked in Erlang, it has forever changed my way of thinking about data problems. My typical PHP or Python code is now littered with a lot of small functions returning tuples where earlier I was prone to over-engineer with a lot of classes.
- ejabberd (/mongooseIM) – XMPP
- Immutable programming model
- Modules + Function overloading
- Good set of BIFs
- Interop with C (performance optimization)
- Robust and scalable with OTP
- Weird syntax (non Cish) – strict naming conventions (might be a win actually) – Elixir might be a big win here actually!
- Low real world usage (might be an offshoot from above)
- Not so great plugins for common usecases (webapps) – mysql
Scalable language or Scala we call is one of those languages which target the JVM directly. And being a hybrid language, it has found good reception among codistas.
- Twitter – Finagle
- Typesafe platform
- Java interop – so support for Netty is directly available – Batteries included
- LISP + Object oriented + Functional = multi-paradigm language
- Touted as the future of Java
- Compiles to bytecode so almost as fast as similar Java code
- New language
- Multi-paradigm – philosophy of 1 language – many ideals
- Mix of immutable (val) and mutable (var) – tries to be too many things to many people
Go is a new language from Google which seems to have a C type syntax as well as the fundamentals of programming in the large systems.
- Google Infrastructure
- Looks like C – small learning curve
- Backed by Google
- Battle tested
- Performance close to C
- Not used by a lot of companies – hard to find developers in the market
- Still very recent and not fully battle tested
Coming with a LISP syntax and a immutability as a core tenet it is a refreshing take of LISP in a JVM. Created by Rich Hickey, its driven very strongly by its creator, the language is quite opinionated.
- Clojure Script
- Java interop – Batteries included
- LISP syntax – almost
- Touted as the future of Java
- Rich Hickey’s philosophy
- New language
- Lisp Style
My lingua franca now. It is very neatly done language and the fact that it is objects (dicts) all the way through is extremely refreshing.
- Good / Fixed syntax
- Simple modules
- Batteries included approach – powerful glue, scripting and even a general purpose language
- Lacking multicore support
- Green threads
While not being in the same league as these full-fledged languages, Lua is one of those languages that can quickly turn an extremely well performing C / C++ code and turn it into a powerfully scriptable system without losing any of the performance
- Open Resty
- Game programming systems
- C / C++ support
- Performance / Speed
- Not a full-fledged language. Any errors bubbles up from the base language directly into Lua
All said, there are a few features I like in a programming language I like working with …
- Modularization of code without having to resort to using classes. This is where PHP loses out for me.
- Installable modules. Batteries included approach.
- Garbage collection. I have seen C, C++ and Erlang’s immutability and any language that does not have me worrying about the trivial pursuit of hanging pointers is a big win!
- Homoiconic systems. It becomes very easy when we start thinking about data and code not as two separate lines of thought (storage, DRY, versioning) but as two varying types of storage semantics only. Where processing (code) and data systems can both crash and need to be restored on demand, it becomes extremely useful when the code itself can be used to express infrastructure, data, configuration and other systems.
- Clear and convention driven programming style. Telling me that it will work the way it looks (WYSIWYG) is simply a huge win. Quite simply, Erlang excels here for me. So does Go and Python.
My only crib. I wish Elixir was in the Python syntax instead of Ruby (of course taking nothing away from Ruby – its an extremely natural language – just a bit too Englishy and flexible for my taste).