From: Sean Chittenden Date: 2002-09-25T04:15:09+09:00 Subject: Re: private variables > |Are we dead set against "attr_private" ? > | > | class Foo > | attr_private :bar > | end > | > |? > > I'm not going to choose attr_private (unless someone put some idea in > my brain), because > > a) we need static information about class local instance variable at > compile time. Dynamic attr_priate at run time is too late. > > b) if we choose attr_private (by making it a syntax), we need to > search for declaration to distinguish whether a instance variable > is class local or not. I don't feel it's a Ruby Way (tm). Hrm, this thread has been so huge that I've been in skim mode. I understand that attr_private wouldn't work because its dynamic and determined at runtime, but I'm wondering if there isn't another single character that could be used in the grammar to designate a private instance variable. I couldn't think of any without there being some kind of compile time declaration of a symbol... but there doesn't seem like there's any way of providing compile time hints outside of the special characters that get prepended to a symbol name. Just a thought, but would it be possible to introduce a compile time syntax for providing hints to the compiler? If so, then that'd likely open up possibilities for other naming schemes. ::shrug:: Just my $0.02. -sc -- Sean Chittenden