Dan Newcome on technology

I'm bringing cyber back

Io on .NET

leave a comment »

No, I didn’t mis-title this post. I’m not talking about I/O, I’m talking about Io. Io is a dynamic programming language whose message-oriented syntax shares some similarity with Smalltalk and whose prototypal object system is similar to that of Javascript. I’m thinking a lot about metaprogramming these days, trying to encode functionality as data as much as possible for some very configurable CRM products.

In the past I’ve done metaprogramming for configurable applications using code generation techniques. The technologies I used were a mix of XSLT and T4 templates. However, I learned that generating code this way is very cumbersome and requires that you add an extra compilation step in addition to compiling the base libraries for your application framework. At the end of the project I had the feeling that using a dynamic language would have been a much better bet than trying to generate C# and compile on the fly.

So what does this all have to do with .NET or Io anyway? Well, having done some work with JScript.NET, I’m now watching out for dynamic languages on the .NET runtime that would be suitable for doing metaprogramming. I checked out Clojure-clr recently and (from the same author) DotLisp a long time ago. I just ran across a .NET implementation of Io during a google search while reading this article by _why on manipulating code as data.

I’ll write up another post when I get a chance to play around with things some more, but in the meantime, I’ll show you that we have full access to the .NET runtime from the Io REPL:

Io> MessageBox Show("Hello")

Written by newcome

July 22, 2010 at 8:45 pm

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: