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

List:       ruby-talk
Subject:    Re: Is this old style Ruby?
From:       Nikolai Weibull <mailing-lists.ruby-talk () rawuncut ! elitemail ! org>
Date:       2005-02-15 14:15:32
Message-ID: 20050215141502.GA5943 () puritan ! pcp ! ath ! cx
[Download RAW message or body]

* Jeremy Tregunna (Feb 15, 2005 15:10):
> Foo::bar is for accessing "bar" (be it a method or class or whatever)
> in the module "Foo". Foo.bar wants "bar" in class "Foo".

That's certainly not the whole truth.

Yes, "::" is used for accessing things in modules, but "::" may also be
used for invoking methods of an object or class.  It is customary,
however, to use "." for methods of objects and "::" for methods of
classes, although the latter seems to be becoming "." so as to separate
it from its used with modules,
	nikoali

-- 
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

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

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