From: YANAGAWA Kazuhisa Date: 2005-02-16T08:23:53+09:00 Subject: Re: Is this old style Ruby? In Message-Id: <1108477682.487306.150420@c13g2000cwb.googlegroups.com> centrepins@gmail.com writes: > It seems a little bit odd to me to have two ways of doing the same > thing. Seems best (as was mentioned above) to stick to :: for module > access and . for everything else. ?? For consistency use ".", for uniformity with other languages use "::". Historically Foo::foo() notation was introduced for those who said that could be more understandable for C++ or Java people. For my own preference, I use "." since that consistent in Ruby --- in Foo.foo, receiver is Foo itself --- and "::" notation always needs () if method name is capitalized. # Well, capitalized name of class methods also out of my preference.... > ruby class Foo; def self.foo; p :foo; end; end Foo.foo Foo::foo :foo :foo > ruby class Foo; def self.Bar; p :bar; end; end Foo.Bar Foo::Bar :bar -:3: uninitialized constant Foo::Bar (NameError) -- kjana@dm4lab.to February 16, 2005 Better late than never.