ara.t.howard / noaa.gov wrote: > On Fri, 31 Mar 2006, Christian Neukirchen wrote: > > if a.kind_of? Boolean > > > > case y > > when Integer > > when Boolean > > end What kind of scenarios would you want to use such a construct? It seems to me not very rubyish to be switching based on the class of an object. As I understand it, the more conventional way to deal with potentially diverse argument types is to use the respond_to? method. This keeps the door open for duck typing. > another thing a real Boolean class could give is a 'maybe' obj such that .... > although i can't think of anything attm to do with this it would undoubtably > lead to some nice logical constructs that more closely parallel the way we > think. It sounds like you're talking about a sort of restricted fuzzy logic, which is very cool, but is not appropriate for the core of a general purpose language. Considering that every expression can be interpreted in a boolean context, what would a maybe value do? Either behavior seems wrong.