From: Chad Fowler Date: 2003-11-28T12:47:20+09:00 Subject: Re: pre/post question/idea On Fri, 28 Nov 2003, David A. Black wrote: # Hello -- # # As we're still pre-2.0, and talking about pre and post, I thought I'd # throw in a bit of possible syntax for this that occurred to me, namely # this: # # class C # def x # puts "how are you?" # end # # pre x # puts "hello" # end # # post x # puts "goodbye" # end # end # # It's possible that there are problems with doing it this way that I'm # not seeing, but personally I like the way it looks better than # # def x:pre # # which to me has a bit of a "spliced onto the language" feel (which # perhaps it is, but it would still be nice to avoid that feel :-) I # like the simplicity and symmetry of separate def/pre/post. # # This is excellent. I hope there aren't any gotchas that nobody has thought of. You're right about the "splicing" thing. This feels a lot more like it's supposed to be a part of Ruby. +1