mustBeBoolean thoughts

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

mustBeBoolean thoughts

Postby g.cotelli » Tue Aug 03, 2010 11:48 am


As everybody knows when we sent some inlined messages (like ifTrue:, or: , etc.) to non boolean objects the VM sends the message #mustBeBoolean instead of raising a DNU as usual.

Is there any reason not to send the message (ifTrue:, or:, etc) when the receiver is not a boolean instance (without losing the inlined performance for boolean instances)? I can’t think of any reason why this couldn’t be done.

If the message were sent, we could easily implement objects polymorphic with boolean instances, like booleans formula. Currently, the only way I know to achieve the same result is reimplementing mustBeBoolean and obtaining the block to be evaluated from the stack, but it's too complex.

Posts: 13
Joined: Wed Feb 24, 2010 9:30 am

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest