[Prev][Next][Index][Thread]

Re: Assert() and Friends



Hi Rob,

Functional Developer has a debugging package, including 'assert',
'debug-message' etc, along the lines that you describe. The
common-dylan initiative was meant to include these features, I
don't remember whether or not that made it in. We should make sure
that this is in place in all Dylan implementations.

Andy

---
Andy Armstrong
andrewa@functionalobjects.com



On Thu, 15 Feb 2001 11:30:03  
 Rob Myers wrote:
>This has been puzzling me for a while, now...
>
>In Dylan code I've seen, there are no Assert()-style macros for
>debugging that I could see. This surprized me, as a debugging library
>could easily be implimented with two sets of macros, one for test builds
>one for final builds, that defined:
>
>define macro assert
>	{ assert( ?expression: ) }
>	=>{ if( ?expression ) break(); end if; }
>end macro assert;
>
>in the debug version, and:
>
>define macro assert
>	{ assert( ?expression: ) }
>	=>{}
>end macro assert;
>
>in the final version. To select test or final, you'd include the
>relevent .lid which would build the relevent version under the same
>library and package name.
>
>Is this a good or bad idea, and why haven't I seen it? Have I just not
>looked at enough code? :-)
>
>- Rob
>
>-- 
>Rob Myers - http://www.robmyers.org/   
>"Narafala dei mo narafala dei mo narafala dei, 
> Wokabaot snel-spid dei long dei..."
> - Ken Campbell, Wol Wantok.
>
>


Get your small business started at Lycos Small Business at http://www.lycos.com/business/mail.html