From: Tom Sawyer Date: 2002-09-14T04:48:35+09:00 Subject: Re: private variables On Fri, 2002-09-13 at 13:02, William Djaja Tjokroaminata wrote: > > 1) The use of the keyword "private" > Any methods defined after this keyword is private. So probably we can > make any new instance variables created after this keyword to be also > private. But mixing the private and non-private variables will be > confusing. private variables being differnt from local ones how? further can a keyword like this work?. other keywords are just shorthands aren't they? well, maybe it can. > 2) The use of a new symbol. > Ruby is to some extent influenced by Perl, and in Perl "$", "@", and > "%" are used to denote the type of variables. Ruby has used "$" and > "@" for special meaning for variables, so this suggests to use "%" prefix > for private variables. you see that's interesting. that's what i purposed for local variables to end writer method ambiguities. ie. does x = 1 mean local variable x = 1, or self.x = 1. -tom -- tom sawyer, aka transami transami@transami.net