Paradigm | object-oriented prototype-based |
---|---|
Designed by | Steve Dekorte |
Developer | Steve Dekorte, Jonathan Wright, Jeremy Tregunna |
First appeared | 2002 |
Typing discipline | dynamic, strong |
Major implementations | |
Io Io.NET | |
Influenced by | |
Smalltalk, NewtonScript, Self, Lua, Lisp, Python, Act1 | |
Influenced | |
Ioke, Potion |
Io is a pure object-oriented programming language inspired by Smalltalk, Self, Lua, Lisp, Act1, and NewtonScript. Io has a prototype-based object model similar to the ones in Self and NewtonScript, eliminating the distinction between instance and class. Like Smalltalk, everything is an object and it uses dynamic typing. Like Lisp, programs are just data trees. Io uses actors for concurrency.
Remarkable features of Io are its minimal size and openness to using external code resources. Io is executed by a small, portable virtual machine.
The language was created by Steve Dekorte in 2002, after trying to help a friend, Dru Nelson, with his language, Cel. He found out that he really didn't know much about how languages worked, and set out to write a tiny language to understand the problems better.
Io's goal is to explore conceptual unification and dynamic languages, so the tradeoffs tend to favor simplicity and flexibility over performance.
In its simplest form, it is composed of a single identifier:
Assuming the above doStuff is a method, it is being called with zero arguments and as a result, explicit parentheses are not required.
If doStuff had arguments, it would look like this:
Io is a message passing language, and since everything in Io is a message (excluding comments), each message is sent to a receiver. The above example demonstrates this well, but not fully. To describe this point better, let's look at the next example: