On Fri, Apr 25, 2008 at 04:49:00AM +0900, David A. Black wrote:
> People can learn to read "File::new", and they can wonder why it
> exists. If it's really because other languages treat class methods
> specially, maybe they should find that out by studying those other
> languages :-) I tend to feel that the "mere methods of mere objects"
> principle is more central here.

While I certainly don't feel that Ruby should be changed in order to
suit users of other languages, I also feel it is foolish to ignore the
fact that certain syntactic elements feel more natural to certain
programmers because of their language backgrounds.  For example, the '.'
syntax for method invocation may feel natural to a programmer with a
background in a simula derivative, but is likely to feel foreign to
anyone else.

I have coworkers who use the :: syntax for singleton method invocation
because it feels natural to them.  The reason it feels natural is
because they come from a language that uses similar syntax for
invocation of static member functions.  If :: had never been used in
Ruby for method invocation, it would probably not be a stumbling block,
but removing it now is likely to cause confusion for many programmers.
On the other hand, afaik I am yet to meet someone who has been genuinely
confused by this syntax being available.

While I personally do not use :: for method invocation, I see little
benefit in removing this feature.

Paul