Todd Benson
9/22/2007 1:29:00 PM
On 9/22/07, Todd Benson <caduceass@gmail.com> wrote:
> On 9/22/07, David A. Black <dblack@rubypal.com> wrote:
> > Hi --
> >
> > On Sat, 22 Sep 2007, Gary Wright wrote:
> >
> > > So despite the fact that class variables and instance variables both
> > > use a similar syntactical sigil (@@ vs @), they are scoped in vastly
> > > different ways.
> >
> > I honestly wish that class variables looked like $$this, rather than
> > @@this. They're so completely unrelated to, and radically different
> > from, instance variables, whereas they're much more akin to globals.
> > The @/@@ thing has caused more confusion than anything else in Ruby, I
> > believe.
>
> I'm in no place to disagree with David, but I should point out that $$
> suggests superiority over $ globals.
>
> My one cent.
Unless, of course, a person understands two symbols together to
represent a subset (like b has superiority over bb).
The @/@@ thing was really easy for me to understand right away because
I could separate them entirely. I wouldn't mind a different symbol
entirely, though.
Todd