From: Jari Williamsson Date: 2008-02-17T18:46:54+09:00 Subject: Re: Use of ? in variable names Morton Goldberg wrote: > On Feb 16, 2008, at 1:04 PM, Michael Brooks wrote: > >> Hello everyone: >> >> Why can't I name boolean variables with a "?" on the end? The "?" can >> be used on the end of methods but not variable. > > Because the rules for naming methods are different from the rules for > naming variables. > >> So why isn't this allowed? Did I miss something? > > You aren't missing anything -- you're just in denial over Ruby's lexical > rules. Maybe you can convince Matz to change the rules to way you want > them to work. But I doubt it. What would it add, in a world of short methods and encapsulation of instance variables? I also feel there's a difference between a ? query method that returns a boolean result and a static boolean value. Best regards, Jari Williamsson