From: William Djaja Tjokroaminata Date: 2002-09-06T01:48:11+09:00 Subject: Re: Ruby aesthetics Hi, I also appreciate the "always open" class definition very much. Next to the Ruby blocks, for me probably this is the second best about Ruby. It is very useful, especially for dealing with built-in classes. There will be much more work to do (using inheritance or encapsulation) if we cannot directly redefine the classes. For example, just by redefining the Array push() and pop() methods (and adding data member), I can have a moving average which is of order (const) instead of order (N). Right now, for me Ruby is already a jackpot. When we are able to deal with the current Ruby GC performance problem in the future, it is not impossible that Ruby may become my "holy grail"... Ooops, I hope I am not off-topic here, wait... it is "Ruby aesthetics", so I guess I am not.... :) Regards, Bill ============================================================================= Gavin Sinclair wrote: > Certainly. That instance_eval method is far removed from normal programming > practices. Adding methods to classes is something that we generally celebrate, > too - although it's certainly weird to start with, depending on your > background. > Some friends of mine think it's too strange and unsafe to modify classes after > they've been built, and I don't blame them (I don't agree, but I don't blame > them). These things take time to appreciate... > At least Ruby suffers from good design, not hacks. > Gavin