From: ara.t.howard@... Date: 2006-03-27T00:53:37+09:00 Subject: Re: Noob: use of the double colon On Sun, 26 Mar 2006 dblack@wobblini.net wrote: >> Bothe seem to work OK. >> Is there a difference? If yes, what is the difference? > > They do both work. I've never understood why the :: exists for this > purpose, since the . is the normal way of sending messages to objects > and works perfectly well whether or not the receiver is a class. It's > on my very short list of things I'd like to see removed from Ruby. i think it's quite useful in the context of metaprogramming or classes or modules as variables: m = method_returning_an_module m::module_method c = method_returning_an_class c::class_method o = method_returning_an_object o.object_method i find this approach helps me understand which kind of thing my variables have at a quick glance. it's a similar idea to naming arrays with plural words people = [] person = people.first which some hate and some love. still, these kinds of techniques can reduce the need for comments and preserve programmer sanity. kind regards. -a -- share your knowledge. it's a way to achieve immortality. - h.h. the 14th dali lama