The Io Language - so close, yet so far
It’s too bad the Io language has an implicit non-overridable “asBoolean” method in the Object base class. That’s a mistake… the same one Ruby and Perl made. Only Smalltalk gets that right. it’d be ok if I could at least override “asBoolean” for my classes as far as ifTrue: and ifFalse: are concerned, but no. Io has its own idea, and that’s that. And I can’t even get it to throw a “must be boolean” error instead. Sigh. So close, and yet so far away.
Comments
It does seem to be an oversight that the "asBoolean" method can't be overridden, however. Especially for such a strongly metaprogramming focused language as IO.