"Neil Conway" <[EMAIL PROTECTED]> wrote:
> On Mon, 2003-09-08 at 11:09, Gaetano Mendola wrote:
> > "Tom Lane" <[EMAIL PROTECTED]> wrote:
> > > I see no value at all in an assert.  The code will dump core just fine
> > > with or without an assert ...
> >
> > Right but an assert can display information about the file and line
> > without debug the application
> I think the percentage of deployments that enable assertions (which
> causes a runtime performance hit) but NOT debugging info (which does
> not) is pretty small.
> ISTM that checking for non-NULL pointers is pretty pointless: just
> because a pointer happens to be non-NULL doesn't mean it is any more
> valid, and dereferencing a NULL pointer is easy enough to track down in
> any case.

I'm not speaking only about to test if pointer is null or not but also do
assert to better understand wich condition shall be verified in some part of
code also to have clear what is going on inside code that may be after years
and years is not clear anymore.

May be I'm not clear enough.
Please tell me when and were an assert shall be used.

Gaetano Mendola

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to