7.12.2006
6:41 AM
You know how I blogged yesterday about why's little meta-programming trick in Ruby? Well, as it turns out, it is just as easy, if not easier, to do in Io.
Trial := Object clone do( runMe := method( self runMe = method(Exception raise("NO MORE.")) writeln("Your trial period has ended.") ) ) t := Trial clone t.runMe #=> Your trial period has ended. t.runMe #=> Exception: NO MORE.
I don't know why I had any doubts.