From: ara.t.howard@... Date: 2006-03-27T02:04:55+09:00 Subject: Re: Noob: use of the double colon On Mon, 27 Mar 2006 dblack@wobblini.net wrote: >> it does though - you know c __must__ be a module (classes being modules). > > Why? > > c = "abc" > c::split(//) # ["a", "b", "c"] wow. i never noticed that! >> harp:~ > ruby a.rb >> A::B::C::D >> 42 >> 42 >> >> and i think it's why '::' can call methods - though this is a w.a.g. > > To each his own. My brain has to parse "namespace::foo" twice: the first > time it says, "Didn't he mean namespace::Foo?" and the second time it says, > "Oh right, Ruby's superfluous message-sending operator" :-) funny - i guess my old c-- habits are showing through! > Absolutely -- indeed, it can be anything. (My String example was meant to > evoke the specific case of a well-know class.) That's why I don't find it > informative. I don't know; I guess I just see the notion of "sending a > message to an object" fully covered, on the operator side (as opposed to the > "send" side), by the dot, and no clear rationale for Ruby having two such > operators. yeah - i really do see that. i bounce back and forth sometimes. i guess there are just cases where, to me, the '::' seems to look better - but it is certainly non-essentially and non-orthogonal. fortunately we are not programming python or all such fluff would be removed! ;-) regards. -a -- share your knowledge. it's a way to achieve immortality. - h.h. the 14th dali lama