[CCC] False class comment

Lex Spoon lex at cc.gatech.edu
Mon Feb 28 23:47:35 UTC 2000


Dwight Hughes <dwighth at ipa.net> wrote:
> -----------------------------------------------------------------
> False defines the behavior of its single instance, false -- logical
> negation. Notice how the truth-value checks become direct message sends,
> without the need for explicit testing.
> 
> Be aware however that most of these methods are not sent as real
> messages in normal use. Most are inline coded by the compiler as test
> and jump bytecodes - avoiding the overhead of the full message sends. So
> simply redefining these methods here will have no effect.
> 
> If you want to actually send them as messages, you will need to send
> them using #perform:with: and #perform:with:with:.
> 
> -----------------------------------------------------------------
> 


Looks cool.  Arguably, though, a better way to call the relevant methods
for real is to tell the compiler to stop inlining them, and then to
recompile everything.  There's no point in calling them with #perform:
etc unless you have actually changed them, and if you have actually
changed them, then you probably want the whole system to enjoy the
modifications.

So maybe we should just leave in the warning and leave out the
circumvention.

Oh yeah, and this is true for both True and False.  So maybe we should
just put this stuff in class Boolean, instead of duplicating it in two
places.


Lex





More information about the Squeak-dev mailing list