[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] [APPROVE] asBoolean



+ Object {
	asBoolean { ^true }
}
+ Nil {
	asBoolean { ^false }
}
// True inherits from object
+ False {
	asBoolean { ^this }
}
+ Number {
	asBoolean { ^this != 0 }
}



yesterday I thought about it, too. one voice for it.

I'd prefer to have Object throw an error though.
I don't like, for example, that Object.size is defined. I had many errors that were a lot harder to find for this reason.
--








.