From: William Djaja Tjokroaminata Date: 2002-09-27T05:36:51+09:00 Subject: Re: adding overload to ruby Hi, This is just my own opinion; I don't know much about strict software engineering. If the user actually needs to access to that variable, because in Ruby class definition is always open, the user can create an accesor for that variable by reopening the class definition. Yes, probably some people would argue that we have come a full circle by opening the private variables. But at least in this case the user is doing in advertently, and not a mistake/bug that he/she is not aware. Regards, Bill P.S. This discussion makes me wanting a mechanism in Ruby to "undo" the effect. I want something to "undef" a method. To redefine I can simply use alias. ============================================================================= MikkelFJ wrote: > This is a general Ruby problem / feature. But making a variable private > would sometimes cause grief becuase some other user actually needs to access > this variable. > In C++ I've seen cases where it was necessary to clone the source code of a > C++ third party library class in order to solve a very valid problem. It is > by no means fun to have to maintain a copy of such code. > I think it is fine that a derived class can create members in its own scope, > separate from the base - but I see no significant reason for preventing > access. > Mikkel