From: Paul van Tilburg Date: 2005-02-16T06:33:52+09:00 Subject: Re: Is this old style Ruby? On Wed, Feb 16, 2005 at 06:13:28AM +0900, Jason Voegele wrote: > Florian Gross said: > > And you can not use :: for accessing methods that start with an > > uppercase letter: > > That's not exactly true: > > [...] > > If you supply a parameter list (or even empty parentheses), ruby will use > :: for accessing methods with an uppercase letter, otherwise it will > assume you are trying to access a constant. That's exactly why I use . for both class and instance method-calls and :: for constants, there still is this overlap but a better semantical devision. Since :: gives a feel for working with "namespaces" (Foo::Bar, Foo::Bar::Konstant) and class and module names are constants too. The . is well-known for method calls (regardless the tape) and you also don't do: def MyClass::classmethod; ... ; end. That's the guideline I follow at least, just my 2�. It seems to be clearer for RubyNubies too (in my experience explaining instance methods, class methods and namespaces to them). Paul -- Student @ Eindhoven | email: paul@luon.net University of Technology, The Netherlands | JID: paul@luon.net >>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181