From: eastcoastcoder@... Date: 2006-02-09T02:18:22+09:00 Subject: Re: Meta-Meta-Programming Very nice. I once used a similar technique to wrap all calls to the logger. Then, if the application threw an exception, the crash report would include all of the recent log entries (even ones that were marked DEBUG and hence not saved to disk). As an aside, this really highlights some of the cultural differences between Ruby and other developers regarding what defines "simplicity". You only need to write one line to wrap. But, if you want to know what's going on, you get: # but it's written only once. # Write once, read never. # Forget about the internals. # Just use it. Rubyists usually define this as simple. Other developers don't: http://www.artima.com/intv/simplexity.html Anders Hejlsberg: Let me first talk a little bit about how I view simplicity in general. No one ever argues that simplicity isn't good, but people define simplicity in a variety of ways. There's one kind of simplicity that I like to call simplexity. When you take something incredibly complex and try to wrap it in something simpler, you often just shroud the complexity. You don't actually design a truly simple system. And in some ways you make it even more complex, because now the user has to understand what was omitted that they might sometimes need. That's simplexity I think this highlights the key cultural difference between Ruby & Python, and shows why Rubyists love all the meta programming, class methods, DSL (like Rails' has_one etc.), and the like, while Pythonistas avoid them.