Tuesday, May 19, 2009

Cobra -- Next Big Thing (in a few years time)

Thanks to Simon Wittber for alerting me to this language via his blog post, "Cobra vs Python".

The Cobra homepage is available here.
The Cobra v Python overview is available here.

I'm going to make the ludicrously early call that this language will be the next big thing, eventually. I will not be moving away from Python any time soon, since (a) my job depends on it, and (b) it's fully operational now. However, I really do think that Cobra is, if not simply 'better', an important step forward in the evolution of dynamic language generally. Watching Cobra develop will provide insights for all languages, I have no doubt!

It has the features that make Python great, plus important features from other languages which will make it even more popular and even more palatable. It allows the kind of productivity you can only get from being able to 'throw something together' using elegant syntax and high-level semantics with dynamic typing, but then it *also* allows optional static typing to get the most out of compile-time checking to provide early-warning of type errors and an extra layer of guarantee of program functionality. It also includes contracts, which, while they could in general terms be implemented in any language using a lot of assert statements, are supported by Cobra with a neat syntax which will encourage their use. I can well imagine using this as a strong argument in its favour -- developers could prototype a system or server using dynamic typing, then go back and tighten up the screws with static typing as appropriate and the introduction of contracts.

It deploys to all major platforms, including .NET.

For me personally, the best features are:
* Decimal arithmetic by default (i.e. the literal 5 will become a decimal, not a float)
* Optional static typing
* Contracts
* That all the best features (for me) of Python are included

Cheers,
-Tennessee