From: Robert Klemme Date: 2003-05-16T16:38:32+09:00 Subject: Re: public/protected/private syntax "Guillaume Marcais" schrieb im Newsbeitrag news:B0000560361@smtp.rapiddsl.net... > I tend to find the public/protected/private keywords in Ruby a little odd. > They don't seem to fit the Ruby syntax. Can you explain that? What do you mean by "don't fit"? > What about the following syntax (for > Ruby 3.0 :)? The scope of the method would be known by the first caracters of > its name, the same way as the scope of a variable is determined by $, @, @@ > or nothing. So: > > class Test > def method1; end # public method > def _method2; end # protected method > def __method3; end # private method > end Err, this is merely a convention for identifiers but a change in syntax. Apart from the fact that it might break existing code personally I prefer the more elaborate version with explicitely written access modifiers. Also I've been told that it's not too good an idea to attach semantic to certain identifiers or identifier formatting. Regards robert