assert or sqAssert? [was: Re: Source Forge Changes for 3.2.1]

Marcus Denker marcus at ira.uka.de
Tue Jan 8 09:01:44 UTC 2002


On Mon, Dec 24, 2001 at 07:10:37AM +0100, Stephan Rudlof wrote:
> The current workaround is to have >>sqAssert: in the LargeIntergersPlugin.
> I'm not happy with this.
> 
> I just want to have an assert function, which does exactly what you expect
> from such a function. The semantics should be the same for as ST #assert: as
> C 'assert()'. And now there comes one compile problem and we have to change
> code on the ST side. Furthermore I have to follow the rule: 'Don't use
> #assert: in plugin code!'. (And when comes the next function name, which I
> cannot use?)
> 
....
> Possible solutions:
> - If it is a macro defined elsewhere, you are probably able to #undef it in
> your special platform specific code.
> - On the other side: what about '#include <assert.h>' as standard for all
> plugins? Then we don't have to define such a function for plugins in ST. And
> the #assert: in ST matches the C 'assert()' well in semantics.
> 

Or: We could chane the SLANG Codegenerator to use a prefix (like "sq_") for
every function it generates... (instead of generationg a function "assert()"
it would generate "sq_assert()" for the "assert:" method)
this would solve this kind of problem once and for all.

   Marcus

-- 
Marcus Denker marcus at ira.uka.de





More information about the Squeak-dev mailing list