D
David A. Black
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 xre
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.
David
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 xre
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.
David