Saturday, November 6, 2010

Language of the year 2011

Probably the biggest programming language hit of the last year was Go - it was also (according to Tiobe) the fastest growing language in 2009. Year 2008 belonged to Erlang: Amazon started their SimpleDB based on Erlang, and Facebook announced their Erlang powered chat application.
For some time I was wondering if the incoming year can bring another player entering the game, and I came to a conclusion that a good candidate is Io. It's a prototype-based programming language, which is amazing in many aspects: it combines very simple grammar with incredible power, provides an interactive shell and a rich set of libraries out of the box, it also allows hundreds of thousands of concurrent processes through actor based model. Io is surprisingly mature as for a language with so few Internet resources and is definitely worth trying - it has been recommended even by some renowned hackers like _why and Ruby's creator Matsumoto Yukihiro. You can find a few Io example routines here.
Give Io a try if you have a minute, I can guarantee that you won't be sorry.

2 comments:

roskoto said...

What you think about node.js? http://www.nodejs.com

Krzysztof Kliś said...

I have a mixed feelings about this project. On one hand, Node allows JavaScript to break out of a schema of language for website front-ends, but on the other one it's just something like Rails for Ruby - it does not make JS a better programming language, only a better programming tool.
There are more interesting engines and frameworks for Javascript, like Rhino or PhoneGap, and each of them has its own application area.
Io is a step forward in the way you think about programming. It has great dynamic capabilities, which allow you to build your own Domain Specific Languages and modify your code at runtime easily. A very good example are Io's addons - when you run Io shell you can operate on numbers just like in any other language:

Io> 1 + 2
==> 3

When you load Range addon, numbers gain new abilities:

Io> Range
==> Range_0x90178d8:
asList = method(...)
at = method(pos, ...)
contains = method(value, ...)
first = Range_first()
foreach = Range_foreach()
index = Range_index()
indexOf = method(aValue, ...)
last = Range_last()
map = method(...)
next = Range_next()
previous = Range_previous()
rewind = Range_rewind()
select = method(...)
setRange = Range_setRange()
slice = method(s, e, b, ...)
value = Range_value()

Io> 1 to(5) asList
==> list(1, 2, 3, 4, 5)

Io also makes inheritance much more natural. Instead of creating abstract classes and complicated hierarchy rules, you just clone an object you want to extend:

Io> figure := Object clone
==> Object_0x983fef8:
Io> figure area := 4
==> 4
Io> rectangle := figure clone
==> Object_0x9798790:
Io> square := rectangle clone
==> Object_0x98fc0a8:
Io> square getSlot("area")
==> 4