[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: assert() vs. return(error)

From: Stuart Celarier <SCelarier_at_corillian.com>
Date: 2006-02-14 05:30:30 CET

Julian wrote:
>Let's try to keep this discussion about the use of assertions separate
from >the thread about one particular instance. To that end, I've
changed the >Subject line.

Brilliant, thanks.
 
>The debate on the relative merits and appropriate usage of assert vs.
error
>return is tricky.

All of the literature on assert (per se) seems to be mostly irrelevant
because the Subversion code uses assert in a non-standard way [1].

The rest of the C world uses the assert macro to compile assertions in
to the debug version, and to remove assertions in the release version.
Subversion always compiles with assertions in the code, including the
release version.

For Subversion, assert means "conditional abort."

I haven't seen another software project change the meaning of assert in
this way, so I don't think much of the existing writing on assert
applies to Subversion.

Best regards,
Stuart

Stuart Celarier | Corillian Corporation

[1] Thread starts at http://svn.haxx.se/dev/archive-2004-11/0421.shtml

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 14 05:30:47 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.