On Apr 23, 10:52 am, Charles Oliver Nutter <charles.nut... / sun.com> wrote: > David A. Black wrote: > > Hi -- > > > I'd like to request the deprecation/removal of :: as a synonym for the > > method-calling dot. I think it's a good opportunity to take out > > something that Ruby doesn't need. We've already got the dot, which > > always means "send a message", and :: already means something else > > (constant resolution). > > > My view is that if it weren't already there, it would never occur to > > anyone to put it in at this point. Of course, it *is* already there, > > but I think it would be well worth taking it out. In my 7.5 years of > > Ruby programming I've never seen it demonstrate any usefulness at all. > > 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. Do you run into any namespace issues with this? If I understand you correctly this harks back to the usage of capitalized methods as module/class factory methods or initializers; usecases that I find quite worthy. But since namespace resolution of methods and constants differ their use is limited. I agree with David. And maybe, relinquishing '::' as interchangeable with '.' could open up it's use for "method constants", and take care of all these usecases. T.