Denis Kudriashov wrote
Hi
We don't want to give up that performance, but we would like to not get caught cheating either. This would be very simple if instead of raising the "must be boolean" error, we could simply retry the send as a regular message send.
This is already in Pharo :)
And it's cool and all, but neither trivial*, nor especially fast:
a := MyBooleanObject new. [a or: [true]] bench '2,829 per second' [false or: [true]] bench '188,853,858 per second'
Cheers, Henry
*Ref threads like http://forum.world.st/Re-Pharo-dev-mustBeBooleanMagicIn-can-crash-the-vm-td4... http://forum.world.st/Re-Pharo-dev-eventual-crashes-pharo-vm-tp4961763.html
-- Sent from: http://forum.world.st/Squeak-VM-f104410.html