Io is a prototype based language created by Steve Dekorte in 2002.
Anything that starts with uppercase has a “type” slot. The jerry object doesn’t have this.
Io calls parent object if a slot doesn’t exist.
Methods:
Get prototype of the object
The master namespace is called Lobby.
Basic rules
- everything is an object
- you send messages to objects
- objects are created by cloning prototypes
- objects remember their prototype
- objects have slots (which are hashes/dicts)
- slots can contain other objects or methods
- a message returns value in a slot or invokes the method there
- if the method is not present, the object passes it to prototype
Lists
Maps
Singletons
- true, false, nil are singletons
- Everything except false and nil are true
We can make our own objects singletons
Looping
Operator table
Links