Guajara in other languages: Spanish, Deutsch, French, Italian ...



Io programming language

The Io programming language is a pure object-oriented language inspired by Smalltalk, Self, Lisp and NewtonScript. Io has a prototype-based object model similar to the ones in Self and NewtonScript, eliminating the distinction between types and classes. Like Smalltalk, everything is an object and there is dynamic typing. Like Lisp, there are no statements, flow control is achieved using functions, and programs are just data trees. Io uses actors for concurrency, a technique rarely used in modern programming languages. Below are some examples of code in Io:

//C++ style comments can be used
#as can shell-style comments
/* and C-stype comments */

"Hello world" print //hello world

for(i, 1, 10, i print) //prints numbers 1 through 10

x := Object clone //small-talk style object syntax, := used for new slots
x = Map clone //when overwriting, = is used.
x prettyprint := method( //make a method with no arguments
    foreach(key, value, write(key, ": ", value, "\\n")) //loop through map
)
x atPut("hi", 1) //put key-value pair in map
x atPut("hello", 2)
x prettyprint /* output:
hi: 1
hello: 2
*/

Io was created in 2002 by Steve Dekorte and can be used under a BSD-style licence.

External links





Wikipedia - All text is available under the terms of the GNU Free Documentation License.

Tagoror dot com  -  Legal Information  -  Contact us