From: GOTO Kentaro Date: 2002-09-14T07:04:36+09:00 Subject: Re: private variables At Sat, 14 Sep 2002 06:22:55 +0900, William Djaja Tjokroaminata wrote: > Wait, wait, wait... I think someone should really have defined what > private variables in Ruby really are. > > Using C++ terminology, I think the private variables in Ruby are really > like C++ "private" variables. In the current Ruby, instance variables are > always "protected", and they can only be made "public" by the accessor > functions. Maybe the subject "private variable" is confusing. In Ruby, the concept of "private" means "cannot be omitted its receiver". But there doesn't exist receiver of a variable. In this sense, variable is already "private". So, I'd like to propose new name "nestable local variable" and "noninheritable instance variable" to avoid confusion. -- Gotoken