I don't think I can read Io that well, but this doesn't seem like a very unique trick; Ruby has method_missing (like the first commenter mentions) and Python has __getattr__. Is there something else I'm not seeing in there?
ref: "Lazy Bricks, Lazy Mortar" by why - WayBackMachine link: http://web.archive.org/web/20080430135919/http://hackety.org...
Hash := Object clone do (
with := method (
hash := Map clone
call message arguments foreach (arg,
# arg = k(v) for eg. t(0)
k := arg name
v := arg argAt(0) asString
hash atPut (k, doString (v))
)
hash
)
)
h := Hash with (t(0), f(1+1), with("hello"), writeln("not writeln!"))
h2 := Hash with (t(100), f("hello" asUppercase), at("my at"), atPut("my atPut"))
Above lazily goes through the Hash with() building the key/value pairs without ever running methods/functions with, writeln, at, atPut and simply takes the method/func name and evaluates its argument into a key/value pair: h at ("writeln") println # => "not writeln!"
h at ("f") println # => 2
h2 at ("f") println # => "HELLO"
This is the reflection alternative the author is referring to in his post.