On Mon, Mar 11, 2013 at 09:07:55PM +0100, folkert wrote: > > > Mmm. Checking for programmer error isn't necessarily a bad idea, though. > > > Yes, it's best done at compile time, but that isn't always possible. > > > > > > Perhaps change it into an assert() instead? > > > > Very well, assert() might be a good idea and I even thought it for a > > second or two, but then the pedantic side of me took > > over. Assert-statements do burn my eyes, you know. But that should be > > easily fixed by wearing PRAGMATISM-protective glasses more often while > > coding. > > Didn't use asserts use cpu-time? E.g. aren't they also executed in > non-debug mode?
Not if you use -DNDEBUG; in that case, assert() expands to nothing. (there are some arguments against using NDEBUG, but that's besides the point here) -- Copyshops should do vouchers. So that next time some bureaucracy requires you to mail a form in triplicate, you can mail it just once, add a voucher, and save on postage. ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
