Io_programming_language Io_programming_language

Io programming language - Definition and Overview

Io is a pure object-oriented programming 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-style 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

Example Usage of programming

SharethePoint: CodeProject: SQL Reporting Services data from SharePoint lists. Free source code and programming help http://bit.ly/6JIDO7
abiiyer: RT @newsycombinator: The Tao of programming http://bit.ly/4D5drn
nicbh: @trevslovelyface I find it more difficult to relate to the programming :D
Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.