Thank you guys. I didn't know about smerl, parse transforms and all metaprogramming goodies. Erlang has always been dynamic *enough* for me; now I see that it's *quite* dynamic for any dynamic purist. And I totally agree with you that dynamic/static classification doesn't really matter as soon as the language allows me to solve the problem elegantly. Thanks again.