Dudes and Dudettes,
The article linked below describes a recent pattern-matching calculus that
facilitates traversal of arbitrary data structures, regardless of their internal
organization, while still preserving strong (and, with trivial extension,
A more accessible (seriously, WTF is with the above's reduction semantics), but
earlier version, which conveys the general idea, is:
"If it walks like a duck and talks like a duck, then it might as well be a
duck?" How about, "If it's an applicative compound or an atom, then it's a term?"
That's right, boys and girls: Not only is dynamically-typed homoiconicity (be it
implemented as lists or maps or... well, anything) for little girls, but static
typing is now your (just as expressive, yet type-safe) daddy.
In the course of developing my thesis, I extended (more like replaced) the
semantics to include matching on cases (and added a polymorphic type
discipline)--essentially, this means one can traverse arbitrary code, rather
than just data structures. If you also throw in Tim Sheard's Meta(Oca)ML
semantics, allowing staged evaluation (see paper below), then you easily
transcend Lisp's girly, variable-capturing, non-type-safe macro facility.
Mwahahahaha! Silly Lispers.