On Apr 23, 2008, at 8:52 AM, Charles Oliver Nutter wrote:
>
> In JRuby we use it to allow a single delimiter for package elements  
> when referring to a Java class.
>
> Given the Java class java.lang.System, you can access it as  
> "java.lang.System", in which the intermediate "java" and "javalang"  
> modules are accessed with dots and the "System" at the end is a  
> method that returns the class, or you can access it as  
> "java::lang::System", where the :: replaces the . for method calls  
> and the "System" at the end is a direct constant reference. You  
> can't do this without :: being available for method calls.

bingo - i do very similar things all the time as well - thousands of  
lines of code....

the fact that code can be refactored so

   foo::Bar

may be module or method call is extremely useful with legacy code that  
need a bit of tweaking.

i think i've written as much, or more, that about any ruby programmer  
out there and i've used this feature extensively.  in fact i recently  
design and api for a client which used the feature extensively and the  
client specifically commented on how 'pretty' the resulting api was.

the real question is if it causes some problem and, we know, it does  
not.  confusion not counting as a problem because that would lead to  
the removed of *many* great ruby features.

besides - having 'one way' to do things is the python mindset ;-)

regards.

a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama