On Fri, 17 May 2013 21:16:12 +0200, Luca Barbato <[email protected]> wrote:
> On 05/17/2013 09:03 PM, Anton Khirnov wrote:
> > 
> > On Fri, 17 May 2013 20:40:06 +0200, Luca Barbato <[email protected]> wrote:
> >> On 05/17/2013 07:15 PM, Tim W. wrote:
> >>> On May 17, 2013, at 3:26 PM, Luca Barbato <[email protected]> wrote:
> >>>
> >>>> A library should not crash on purpose.
> >>>> ---
> >>>>
> >>>> I find dangerous leaving them around, the performance loss is negligible
> >>>> probably, but leaving them around on release build feels wrong 
> >>>> nonetheless.
> >>>
> >>> +10000
> >>>
> >>
> >> I might consider purging the whole codebase out of them... Who is against?
> > 
> > I am.
> > 
> > asserts are good when used properly.
> 
> So only when developing something, not when releasing. Leaving active
> asserts in release builds is horrible.

I disagree.
A proper use for an assert is when the code following it would crash anyway if
the assert wasn't there and the asserted condition was false. In such a case the
assert makes it much easier to track what went wrong. It can also simplify
understanding the author's intent.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to