From: Todd Benson Date: 2007-09-22T22:29:09+09:00 Subject: Re: question re: modules and class variable scope On 9/22/07, Todd Benson wrote: > On 9/22/07, David A. Black 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