From: Dave Thomas Date: 2000-07-10T17:31:25-05:00 Subject: [ruby-talk:03918] A question about variable names... The rules for name construction seem to be that the first character (which determines the name's usage) should be an upper or lowercase letter, a dollar sign or an at sign. The remainder of the name is drawn from [a-zA-Z0-9_]. So, this means that $3 and @27 and valid names for a global and instance variable respectively. class Dave def initialize puts n @23 = "hello" end def get @23 end end However, I cannot create a symbol corresponding to the instance variable "23" - :23 is invalid syntax. Then... If I create an attribute for my instance variable using attr "23" I can't use it: Dave.new.23 is parsed as passing the argument '0.23' to Dave.new. So... I'm wondering if allowing a digit as the first character after the @ in an instance variable name is a good idea? What does the panel think? Regards Dave