----- Original Message -----
From: "Dominique Devienne" <[EMAIL PROTECTED]>
To: "'Ant Developers List'" <[EMAIL PROTECTED]>
Sent: Monday, July 15, 2002 9:35 AM
Subject: RE: Why stop at JDK1.2? Only semi-serious question...


> You can still emulate this by wrapping all your assert's in an
>
> if (RELEASE) {
>   assert ...;
> }
>
> with RELEASE a static final boolean... --DD

...but only with code that is to compile onto 1.4. With macros we could
strip them out the source.

the alternate approach is to have @pre and @post conditons in the javadocs
and have something autoinsert them into the source at compile time.

>
> -----Original Message-----
> From: Steve Loughran [mailto:[EMAIL PROTECTED]
> Sent: Sunday, July 14, 2002 1:58 PM
> To: Ant Developers List
> Subject: Re: Why stop at JDK1.2? Only semi-serious question...
>
> Nice idea though about an assert stripper at build time; I belive C had
such
> a thing a long time ago
>
> #ifdef RELEASE
> #define ASSERT(fact)
> #else
> #define ASSERT(fact) _assert(fact,_FILE_,_LINE _)
> #endif
>
> or something thereabouts :)
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to