On Nov 16, 2007 9:26 AM, Roger Pack <rogerpack2005 / gmail.com> wrote:
> > I'm arguing that methods that end in "?" should be designed and used as
> > answers to true/false  or yes/no questions.  That they can return an
> > arbitrary non-nil object to indicate 'true' is convenient, but I'm
> > skeptical of the value of "?" methods being used as both boolean
> > indicators *and* object accessors.
> >
> > Its a matter of hiding implementation details, and self-documenting
> > code.
>
> Yeah--I'd be in favor that anything that ends in ? be something that can
> be evaluated as nil/non-nil (and hence having a 'boolean-only' variable
> that ends with ? would be the same effect, hence my wishing that
> variables could end in ?.  Then you wouldn't have to create wrappers for
> them.  My $0.02)
>

Like I said before, I can see the utility of such a thing, but the ?
symbol is sort of special.  In other words, I don't see it useful to
add functionality to Ruby that makes the ? symbol equal to whether a
variable/accessor exists or not.  It doesn't fit for me.  Maybe
another symbol/word?

Todd