[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Disabling assert function
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 19 May 2010 13:19:56 +0200
On Wed, May 19, 2010 at 1:06 PM, Nikolai Kondrashov <spbnick@gmail.com> wrote:
> Thanks, I think that Metalua or maube LuaMacro as Steve suggest is my way :)
> Completely forgot about the macros when I asked the question :)
There's always C.A.R Hoare on the subject of disabling assertions:
[[
... it is absurd to make elaborate security checks on
debugging runs, when no trust is put in the results, and
then remove them in production runs, when an erroneous
result could be expensive or disastrous.
]]
He also expressed it less formally, that it was like throwing away
your lifeboats when it was finally time to take your ship to the sea
;)
But it's true, assertions have a cost...
steve d.