Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ws8JO-0006PH-BJ for bitcoin-development@lists.sourceforge.net; Wed, 04 Jun 2014 10:20:50 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.219.48 as permitted sender) client-ip=209.85.219.48; envelope-from=mh.in.england@gmail.com; helo=mail-oa0-f48.google.com; Received: from mail-oa0-f48.google.com ([209.85.219.48]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Ws8JN-0005tT-8I for bitcoin-development@lists.sourceforge.net; Wed, 04 Jun 2014 10:20:50 +0000 Received: by mail-oa0-f48.google.com with SMTP id g18so7537903oah.21 for ; Wed, 04 Jun 2014 03:20:43 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.63.110 with SMTP id f14mr55682242oes.8.1401877243590; Wed, 04 Jun 2014 03:20:43 -0700 (PDT) Sender: mh.in.england@gmail.com Received: by 10.76.71.162 with HTTP; Wed, 4 Jun 2014 03:20:43 -0700 (PDT) In-Reply-To: References: <1401822421.27942.YahooMailNeo@web124505.mail.ne1.yahoo.com> Date: Wed, 4 Jun 2014 18:20:43 +0800 X-Google-Sender-Auth: bRHwjs5xDZ49QP0PfFYM2nnxPpo Message-ID: From: Mike Hearn To: Gregory Maxwell Content-Type: multipart/alternative; boundary=001a11c218741f808b04fafffb1b X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (mh.in.england[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1Ws8JN-0005tT-8I Cc: "bitcoin-development@lists.sourceforge.net" , Ron Subject: Re: [Bitcoin-development] # error "Bitcoin cannot be compiled without assertions." <<< List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 10:20:50 -0000 --001a11c218741f808b04fafffb1b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > As a matter of procedure we do not use assertions with side effects=E2=80= =94 the > codebase did at one point, but have cleaned them up. In an abundance of > caution we also made it refuse to compile without assertions enabled: A > decision who's wisdom was clearly demonstrated when not long after, some > additional side-effect having assert was contributed. In the real world > errors happen here and there, and making robust software involves defense > in depth. > I think this class of errors could be removed entirely by just saying it's OK for assertions to have side effects and requiring them to be enabled, as is currently done. The glog library: http://google-glog.googlecode.com/svn/trunk/doc/glog.html provides CHECK macros that print stack traces when they fail. Using them would also be good. --001a11c218741f808b04fafffb1b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
As a matter of = procedure we do not use assertions with side effects=E2=80=94 the codebase = did at one point, but have cleaned them up.=C2=A0 In an abundance of cautio= n we also made it refuse to compile without assertions enabled: A decision = who's wisdom was clearly demonstrated when not long after, some additio= nal side-effect having assert was contributed. In the real world errors hap= pen here and there, and making robust software involves defense in depth.

I think this= class of errors could be removed entirely by just saying it's OK for a= ssertions to have side effects and requiring them to be enabled, as is curr= ently done.

The glog library:


provides CHECK macros that print stack traces when they fail. Using them wo= uld also be good.
--001a11c218741f808b04fafffb1b--