Objects

Io is a prototype-based language. There are no classes and instances; there are only objects.

Objects are typically cloned (from Object or some other existing object) and then extended, i.e. attributes are added to it on the fly.

Emulating classes (sort of)

A typical idiom seems to be:

a := Object clone do(
   x := 42
   foo := method(...)
   ...etc...
)

The do method evaluates whatever is defined in its scope and adds it to the object. So the aforementioned code is the same as:

a = Object clone
a x := 42
a foo := method(...)

TODO:

For Object and its methods, see here.