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

List:       ruby-talk
Subject:    Re: Is this old style Ruby?
From:       "Robert Klemme" <bob.news () gmx ! net>
Date:       2005-02-15 17:14:56
Message-ID: 37ep00F5a0vpaU1 () individual ! net
[Download RAW message or body]


"David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
news:Pine.LNX.4.61.0502150635500.30704@wobblini...
> Hi --
>
> On Tue, 15 Feb 2005 centrepins@gmail.com wrote:
>
> > Page 349 of the (printed) pickaxe2 mentions '::' and '.', but doesn't
> > really suggest which one is best to use.  So I guess it's possibly one
> > of those "preffered-style" things?
>
> I've never seen :: used where the receiver was anything but a Class or
> Module, and usually for constant access rather than method access.
> *Please* let's not start seeing it in the general case....
>
> > It seems a little bit odd to me to have two ways of doing the same
> > thing.  Seems best (as was mentioned above) to stick to :: for module
> > access and . for everything else.  ??
>
> I would advocate :: for constant access, and . for method access.

+1 (Exactly the convention I follow).

Kind regards

    robert


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

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