On Tue, Jan 29, 2019 at 04:38:56PM +0100, Tim Duesterhus wrote:
> Willy,
> 
> new patch with the requested changes and updated tests.
> 
> Note: I added an `assert` in there to make sure that ht*_select_comp_reshdr
> actually verified the ETag header before I am touching it. There *is* 
> precedence
> for `assert` in `checks.c`. Please remove the `assert` if you are not happy
> with it.

I will do :-) I absolute hate assert, almost every time they are used,
they are wrong, or a lazy error handling case serving as a todo for
later, and generally when they are used it's because the person who
places them is not yet very certain to have caught all cases, thus it
means that practically speaking they WILL cause crashes in field under
unplanned situations. Anyone who has ever used Gimp in foreground knows
how scary it can be to be all these asserts continuously scrolling and
making you figure that you avoided a crash every 200 milliseconds
because they're running in warning mode instead of crash mode.

I'm not against using assert() for debugging purposes but it requires
that NDEBUG is always set for production code, and unfortunately quite
some people set their own build options and will not have NDEBUG set,
so they will suddenly run debugging and fragile code.

And regarding the one in the checks, I've verified, it was added only
in the init code so it cannot provoke a crash after starting (and it
was obviously not added by me).

Thanks!
Willy

Reply via email to