[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Is this old style Ruby?
From:       Hal Fulton <hal9000 () hypermetrics ! com>
Date:       2005-02-15 23:51:38
Message-ID: 42128AF7.7040002 () hypermetrics ! com
[Download RAW message or body]

centrepins@gmail.com wrote:
> So you would say use :: only for constant access, and use '.' for
> method access be it in a class or module?
> 

Certainly, IMO. I usually say Math.sin rather than Math::sin. Basically
I don't care in general whether it's a class or just a module. (There
might be times when I do care.)

As for module names and class names (replying to what someone else said),
remember that these are typically constants. In other words, if Foo::Bar
is a class, it's just a special case of Foo::Bar being a constant.


Hal


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic