From: Robert Klemme Date: 2003-11-28T18:32:10+09:00 Subject: Re: pre/post question/idea "Peter" schrieb im Newsbeitrag news:Pine.LNX.4.44.0311280359580.3918-100000@merlin.cs.kuleuven.ac.be... > > 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. > > You've got my vote for looks. But it means two extra keywords which breaks > extra stuff, and I'm not fond of that. But 2.0 is allowed to break stuff > :-) so my vote stands. matz wrote: > That's the point. Hooking method is a part of metaprogramming, which > should be handled with care, even in the future. x:*** are a good > signs for it. Then how about introducing new keywords that are unlikely to break other code? def foo def:pre foo def:post foo def:wrap foo It's visible significant enough to ring a bell and it doesn't change the method name, which IMHO better matches the semantics: this is a "def" of an ordinary method, but the definition of a method wrapper. Kind regards robert