Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WsA6T-0002jx-8n for bitcoin-development@lists.sourceforge.net; Wed, 04 Jun 2014 12:15:37 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of bitpay.com designates 209.85.212.177 as permitted sender) client-ip=209.85.212.177; envelope-from=jgarzik@bitpay.com; helo=mail-wi0-f177.google.com; Received: from mail-wi0-f177.google.com ([209.85.212.177]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WsA6R-0001n3-Hw for bitcoin-development@lists.sourceforge.net; Wed, 04 Jun 2014 12:15:37 +0000 Received: by mail-wi0-f177.google.com with SMTP id f8so1323424wiw.10 for ; Wed, 04 Jun 2014 05:15:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=vRKwj7wfAsIbvsJc+7uyksdTbDNOVoS1VRCQeciHbnY=; b=MCeFeKSg0SYMaylKMKupk2/cSGjexn5OsFxe+dgBHi3HmpwXDKNBhAD+3gW9XrM0eK tp/zQMDRzD6Mw29wqL4XSHWzDMIyqWvecVj19UG7xLQLAFduEim/g47+V2F9pAk39bx6 pfPac+JcK/b0MpW6tlV7p7T/Boj/e0TFx39WvnoXmPaRv3SiWmZ30TJOwGiHR7ZftEXj AQTf/d4x2ODmhKRa/FzWNe81au1xFa11T8EbdQo9eWojda0TlRmUxVW65XrybAXhkQXT CAfW7blRMXCazD6GKmUPlkgl1KKTUgxGBE4sufe3gPxfk0xbxL7y839gLQDm1MPugJ8k 5obw== X-Gm-Message-State: ALoCoQmjLf1mV1+92rxu6k+ibgXtAI0WRjz8XvScFt4qztAu9YWKa7/jwHTIdXkVrqESP1LbOvws X-Received: by 10.180.73.66 with SMTP id j2mr4318793wiv.36.1401884128745; Wed, 04 Jun 2014 05:15:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.195.12.3 with HTTP; Wed, 4 Jun 2014 05:15:08 -0700 (PDT) In-Reply-To: References: <1401822421.27942.YahooMailNeo@web124505.mail.ne1.yahoo.com> From: Jeff Garzik Date: Wed, 4 Jun 2014 08:15:08 -0400 Message-ID: To: Mike Hearn Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.6 (-) 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 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: 1WsA6R-0001n3-Hw 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 12:15:37 -0000 Yes, check macros like that can be useful. I like the kernel's policy, which parallels our direction: 1) Enable and use lightweight assertions for most users. 2) No assertions with side effects If you want to compile them out, that's fine, but they should always be present in production software. On Wed, Jun 4, 2014 at 6:20 AM, Mike Hearn wrote: >> 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 defens= e 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. > > -------------------------------------------------------------------------= ----- > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and thei= r > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > --=20 Jeff Garzik Bitcoin core developer and open source evangelist BitPay, Inc. https://bitpay.com/