bug 116546
Derek Atkins
warlord at MIT.EDU
Tue Jul 29 14:06:44 CDT 2003
linas at linas.org (Linas Vepstas) writes:
> > > + if (1 < be->nest_count) {
> > > + LEAVE("be->nest_count < 1: %d", be->nest_count);
> > >
> > > The message is reversed. This is checking whether be->next_count > 1
> > >
> > > (FWIW, I absolutely despise this style, for this exact reason!)
>
> I love this style. Its saved my but several times when I types
> be->next_count = 1
> instead of
> be->next_count == 1
Note that I said NOTHING about == tests.. It's < and > tests that
cause confusion (and honestly over the last few years I've fixed at
least 5 bugs due to broken "reverse" comparrisons). If you want to
use "1 == be->next_count" then fine... However please use
"be->next_count > 1".
> I admit it contrary to the norm, but its not hard to get used to,
> and after a while, you wonder why everybody doesn't use it.
Sorry, but it's very hard to get used to. "1 > foo" just isn't
intuitive to about 99% of the programmers out there (including me).
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list