On Mon, Mar 11, 2013 at 12:28:45AM +0100, Wouter Verhelst wrote: > On Sun, Mar 10, 2013 at 11:38:10PM +0200, Tuomas Räsänen wrote: > > > > 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. > > Why? >
Just mild allergy, nothing serious. But seriously speaking, I've just never used to use those. I've always seen them as unnecessary cruft, as footprints of Captain Obvious or something. But, I do think that explicit is better than implicit, and in that light, I think that there might be even some inherent beauty in them. I'm glad you asked, made me think. What do you think, should we actually use this kind of assertions more often throughout the code base? Now there is only a couple of assertions, but the code is full of hidden/implicit invariants, waiting to be stated explictly. -- Tuomas ------------------------------------------------------------------------------ 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
