[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: level argument for assert
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 3 Jan 2013 19:40:37 +0200
On Thu, Jan 3, 2013 at 7:27 PM, Philipp Janda <siffiejoe@gmx.net> wrote:
> Sometimes it's not easy to modify the user's code, so some C people leave
> the asserts in place even for production code.
C.A.R. Hoare wrote that turning off asserts in the field is analogous
to taking the lifeboats off a cruise ship before it sets sail on the
open ocean.
Well, fair enough. Actually, I was not trying to be funny or
side-ways - the current common usages of assert() make it hard to add
an extra argument without interesting consequences for existing code.
So invent a new one with the desired property, basically. But
assigning it to the global assert can be problematic.
steve d.