08 March 2007

eval is amazing.

In terms of things, eval is much bigger than JSON callbacks, even bigger than Lisp itself. It's big like the ribosome --- eval is how things come alive.

For example, I'm rendering urls and associated metadata in the browser from a ruby cgi script. Instead of some big XML specification, I'm just passing an array of strings from server to client. It's big_array.inspect in Ruby, and eval(inspectedBigArray) in Javascript. No monadic parsers, no macro magic; inspect and eval, code I don't even have to write myself. (And if the inspected big array is too big, the browser can start lysis; so it goes.)

G J Sussman: Programming is a good medium for expressing poorly-understood and sloppily-formulated ideas: exactly the opposite of people who'd want to plague me with type theory.