Kent Dahl <kentda+news / stud.ntnu.no> wrote:
> 
> Not yet on the duck typing train, I see.
> 
> The ?-methods are still self-documenting in the sense that they tell you 
> how you can use the result: as a boolean. That is a type, as in "I may 
> be used in conditionals", and not a class, as quite evident by the lack 
> of the Boolean common ancestor.

Well and good, but they don't document the fact that the return value
can be used as anything other than a boolean. Duck typing or no, I find
it conceptually messy to have a method called nonzero? return self
rather than true - compare nil? and zero?. Using the value of self feels
like relying on an undocumented side effect. (I feel the same way about
! methods returning nil rather than self when they haven't made a
change).

martin