Type Safety (was Re: fun and empowerment)

Stephan Rudlof sr at evolgo.de
Mon Jan 31 00:23:59 UTC 2000


Vassili,

that's great!

I just wanted to write a reply to Lex assert suggestion to say that it
would be nice if assert on/off would be considered at compile time and
not only at run time. But I thought I had to check the other mails first
and now:

Thank you!

Stephan

Vassili Bykov wrote:
> 
> > From: Lex Spoon [mailto:lex at cc.gatech.edu]
> > [...]
> > For internal checks like you describe, it would be cool if Squeak had a
> > global assert: function:
> 
> Here is a "deluxe" version of #assert.  It inlines (or omits) assertion code
> and recompiles all methods that have inlined assertions once the inline
> setting changes.  It is similar to the #assert: I wrote for VW a few years
> ago, except this time I though making #assert look like a message sent to a
> block is a better thing.
> 
> It does not use Preferences as you suggested in your post, just use
> "MessageNode inlineAsserts: <aBoolean>".  I guess I could have modified
> #noteThatFlag:justChangedTo: in Preferences class to give UI access to it
> but I hate overriding existing methods in change sets.  There is little
> choice with MessageNode class>>initialize, of course.
> 
> --Vassili
> 
>   ------------------------------------------------------------------------
>                   Name: Assert.1.cs
>    Assert.1.cs    Type: unspecified type (application/octet-stream)
>               Encoding: quoted-printable

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3





More information about the Squeak-dev mailing list