I've written a very powerful C++ binding library for Io. It allows you to mirror object-based C++ APIs inside Io and will do most conversions for you automatically. (For instance you don't have to worry about calling methods by pointer or by reference; it will "do the right thing" automatically.) I've used it to bind the Bullet physics engine and the Irrlicht 3d graphics engine, for game making.
One very simple thing that Io gets right is the unification of instance variables and methods as slots. It lets you override behavior with little friction:
Person := Object clone do(
name ::= nil
greeting := method(
"Hello I'm " .. name
)
)
bob := Person clone setName("Bob") greeting
# => I'm Bob
bill := Person clone
bill greeting := "Yo"
bill greeting
# => Yo
Notice that you use bob.greeting() but bill.greeting (without the parentheses), while Io uses the same syntax in both cases. Whether this is good or bad is mostly a matter of preference, I think...
Of course, this implies that Io would need a separate construct to get the value of a slot (e.g. bob getSlot("greeting")), while in Python you'd just use bob.greeting no matter whether greeting is callable or not.
Your code isn't general. You have to change the interface. In Io is there just one interface (send a message). If the slot identified by the message send is activatable (a method), then it is activated, otherwise it is just returned.
I don't know. Of course it's nice if a language has an informative homepage (which Io does), but I think languages shouldn't (and probably can't) be judged at a glance.
Instead of "quick stuff", I'd rather have a (possibly peer-reviewed) paper about the language.
If only there was actually an Io community... If you notice, practically everyone in here mentions they've "dabbled" with Io, but practically no one is using this for production code.
Io still doesn't even have releases which I find pretty disconcerting.
That can be a problem. When I wanted to "freeze" a version of Io to use as a base for making the game engine scripting off of, there wasn't a point release I could refer to as "the last stable version". So I just took the then-most-recent github snapshot and forked it (forked in the github sense) and I will update that as I vett new versions of Io against my own code. It has proven to be stable enough not to be a problem, but I think when someone wants to get started in it, the lack of an official pre-built binary to download and install may throw people off. This has been discussed on the mailing list and I wouldn't be surprised if Steve is already working on getting some binaries like that up somewhere.
Yeah I actually asked Steve about this and heard the "We're busy people; we have families" response. There's nothing wrong with this by itself, but when you couple it with the size of the community it makes me wonder if Io will forever be "a fun idea", but nothing more.
I sincerely hope they get point releases up. Can you imagine someone with a casual interest in the language being in love with the fact that they have to keep their own version up to date and review core code for inclusion in their "version"? What about libraries across those frozen versions? It's a recipe for disaster and it pains me to no end that it hasn't been done yet.
..but practically no one is using this for production code.
Io isn't very fast, certainly not in comparison to MacRuby or IronRuby - or even YARV. It doesn't do all too well against Python or any other scripting language either.
But, thats okay. The purpose of Io is (as I view it) to explore OO programming. And it is very good at that purpose.
Io has panache and a bunch of interesting ideas, but to me, the fact that I've never even been able to get it to compile on x86/BSD is telling. (And I've done a fair bit of porting.)
I eventually switched to Lua, and I haven't regretted it for a second - it's dynamic and expressive, but still a mature, portable, and clean language.
I absolutely love Io, and my favorite "feature" of the implementation is the ability to modify scripts in real time and have the changes take place immediately, for better or worse ;)
...and it was the only language I hadn't seen anything of before. Interesting mix of paradigms, and very clean syntax, at least from the little I've seen of it. If any HNers have used it for a non-trivial project, would love to hear of your experiences please.
Io is by far my favorite language. Steve did a fantastic job of removing everything that isn't necessary from OO, leaving a simple and powerful language.
The downside of using Io is that you'll end up writing a lot of libraries yourself, since there isn't a large community yet.
I'm using it for scripting for a game engine. Its lazy evaluation feature allows me to define domain specific languages right inside the Io language, so for instance I've used it to implement a syntax for declaring the properties of 3d objects (shape, color, position, type, etc.) that is inspired by cascading style sheets.
It performs better than I expected - when I profile the code, Io is never the main consumer of the CPU; it is always the graphics first and secondarily the physics. Occaisionally I make a mistake in my binding library that makes the binding library itself consume too much CPU, but when I fix those bugs it goes back to profiling as the script using only about 4% - 5% of my CPU budget.
I only played around with it a long time ago. Very interesting language indeed. You may also like Ioke (http://ioke.org/) - a jvm based language that is directly inspired by Io.
Ioke is lovely. Not particularly practical, but I had a ton of fun learning and contributing to it. More friendly and approachable and (if I understand Ola correctly) explicitly macro-friendly than Io. I think of it as the ultimate DSL language.
I've been looking for a post-lisp for some time now, and while I find Clojure very entertaining, RH took making it a Lisp seriously. This constrains it from the complete and utter evil I can accomplish with Io.
Love the language and found it quite a joy to learn and use. Written a few little scripts with it and as a learning exercise I took defunkt's ike (http://github.com/defunkt/ike) and refactored and added features to it.
However the implementation has caused me some headaches. For eg. some of the Addons have dependency issues and I could never get the VM to compile at all on my Apple Powerbook (PowerPC). Also be the VM is very slow (for an example it is slower than Ruby 1.8).
But overall I came away with positive feelings about Io and I am definitely keeping my eye on it.
Here is a fun FizzBuzz I wrote:
for (n, 1, 100,
fb := list (
if (n % 3 == 0, "Fizz"),
if (n % 5 == 0, "Buzz")) select (isTrue)
if (fb isEmpty, n, fb join) println
)
I've found Io very interesting as well, but have never gotten it to build successfully on OpenBSD. It seems like the Io community is fairly Mac-centric, so it's probably easiest to bootstrap on OS X.
Lua also does prototype-based OO* , and is quite a bit more mature (and performs better, etc.). I've been using that instead, and I'm quite happy with it. (It also plays verrrry nicely with C.)
* Actually, it's more general than that - Lua has extensible semantics (via metatables). Setting up a prototype-based OO system is dead easy, and is a bit of a cliche example for how metatables can be used.
I absolutely love it, but it at least used to be very slow, even compared to other scripting languages, and didn't offer anything really compelling that I wasn't getting out of Smalltalk.
It has gotten faster. The way I deal with the speed for games is I use it for object creation and hooking things up, and then I let C++ code in the libraries I use take care of the low level. For instance when I create a game object I use Io to create a Bullet physics object and an Irrlicht graphics object, and then I instantiate a motion state (a C++ object) that connects the two instances together. After that, when the physics object updates its position, the update feeds through to updating the graphics object without needing to touch script as a "middleman".
* Io Has A Very Clean Mirror - http://web.archive.org/web/20080212010904/http://hackety.org...
* Lazy Bricks, Lazy Mortar - http://web.archive.org/web/20080430135919/http://hackety.org...
Unfortunately they're only available via WayBackMachine.
Other useful links:
* Io notes - http://iota.flowsnake.org/
* Io sub-reddit - http://www.reddit.com/r/iolanguage/