Guillaume Cottenceau wrote:
> ...
> > Aap.class_eval { def wim; puts 'zus'; end }
> 
> Not every readable IMHO... and it is also longer (in characters) than the
> current "default" (not very elegant IMHO) way of doing it:
> 
> class Aap; def wim; puts 'zus'; end; end
> 

hmm.

Not that I care, but it occurred to me that we have eval,
class_eval, and instance_eval. I wonder if that means it would 
be okay to have def, class_def, and instance_def?

class_def Aap.wim; puts 'ZUS'; end
(class method, same as class<<Aap; def wim....end)

instance_def Aap.wim; puts 'zus'; end
(instance method, same as class Aap; def wim; puts 'zus'; end; end)

And I suppose some thinking should go into a module_def, too.


Guy N. Hurst

P.S. And maybe even a yield_def to match the anticipated yield_eval ;-)

-- 
HurstLinks Web Development    http://www.hurstlinks.com/
Norfolk, VA  23510            (757)623-9688 FAX 623-0433
PHP/MySQL - Ruby/Perl - HTML/Javascript