>>>>> "Paul" == Paul Prescod <paulp / ActiveState.com> writes:

    Paul> jweirich / one.net wrote:
    >> Everytime someone suggests making more things "false", I think of this
    >> conversation.

    Paul> How is it useful to know the complete set of things that are
    Paul> false in the world?  In an object oriented language, each
    Paul> object determines if it is false. What is the complete list
    Paul> of objects in the Ruby universe that respond false to the
    Paul> ".nonzero" message? I don't think you can innumerate
    Paul> them. But does it matter?

Hi Paul.  I don't think its important to be able to enumerate all of
the "objects" that act like "false".  But I think its important to
understand how an instance of a particular class will behave when
interpreted in a boolean context.  That was the point of the original
poster when he misunderstood how "0" was interpreted in a boolean
expression.

I wasn't trying to poke fun at Python (at least not much).  Python is
a fine language[1] that made different choices.  However, I think this
conversation indicates that there can be as much confusion from
Python's plethora of false values as there is from Ruby's false and
nil.

-- 
-- Jim Weirich     jweirich / one.net    http://w3.one.net/~jweirich
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct, 
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

[1] Just for the record, I voted for Python in the "If I can't have
    Ruby what would I use" poll.