public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Mike Hearn <mike@plan99•net>
To: Ron <rdwnj@yahoo•com>
Cc: "bitcoin-development@lists•sourceforge.net"
	<bitcoin-development@lists•sourceforge.net>
Subject: Re: [Bitcoin-development] # error "Bitcoin cannot be compiled without assertions." <<<<NOT
Date: Wed, 4 Jun 2014 17:51:31 +0800	[thread overview]
Message-ID: <CANEZrP18nf0oK6fbnE59opXxfMdwiOOu4v99iGyXyGo_7NLuYA@mail.gmail.com> (raw)
In-Reply-To: <1401822421.27942.YahooMailNeo@web124505.mail.ne1.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]

Hi Ron,

FYI your mail is being spamfoldered due to Yahoo's DMARC policy and the
brokenness of the SF.net mailing list software. I would not expect to get
replies reliably whilst this is the case. I think we should move away from
SF.net for hosting mailing lists personally, because it's this list that's
at fault not Yahoo, but until then you may wish to send to the list with a
different email address.

As to your question,

assert() should have *no* side effects, that is the problem.
>
> See
>
> http://books.google.com/books?id=L5ZbzVnpkXAC&pg=PA72&lpg=PA72&dq=Gotcha+%2328+Side+Effects&source=bl&ots=Rn15TlPmje&sig=tymHqta0aSANwaM2GaXC-1Di_tk&hl=en&sa=X&ei=uVKNU47fCcvTsAT6goHIBA&ved=0CCAQ6AEwAA#v=onepage&q=Gotcha%20%2328%20Side%20Effects&f=false
>
> a great book, BTW.  Everyone who thinks they know what they are doing when
> they write C++ should read this book!  They will realize that they don't
> know Jack [image: Roll Eyes]
>
> Why weren't these and all the other examples of amateur, i.e.,
> non-professional, software fixed way back in version 0.3.0 in 2010, before
> any more releases were done?  And why were these and other sub-standard
> coding practices continued and expanded in later releases, right up until
> the present?
>

Back in 2010 most code was still being written by Satoshi so perhaps you
should ask him. Regardless, it's very common for professional codebases to
require assertions be enabled. For example the entire Google C++ codebase
uses always-on assertions that have side effects liberally: it's convenient
and safe, when you have the guarantee the code will always run, and the
performance benefits of compiling out assertions are usually non-existent.

So for this reason I think Bitcoin Core currently will fail to build if
assertions are disabled, and that seems OK to me.

[-- Attachment #2: Type: text/html, Size: 3468 bytes --]

  reply	other threads:[~2014-06-04  9:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 19:07 Ron
2014-06-04  9:51 ` Mike Hearn [this message]
2014-06-04 10:12   ` Wladimir
2014-06-04 10:15   ` Gregory Maxwell
2014-06-04 10:20     ` Mike Hearn
2014-06-04 10:31       ` Gregory Maxwell
2014-06-04 12:15       ` Jeff Garzik
2014-06-04 10:42     ` Jannis Froese
2014-06-04 10:51       ` Mike Hearn
2014-06-04 12:13       ` Wladimir
2014-06-06  8:29       ` Wladimir
2014-06-06  8:40         ` Pieter Wuille
2014-06-07  0:57           ` Jeff Garzik
     [not found] <mailman.192896.1401886427.2163.bitcoin-development@lists.sourceforge.net>
2014-06-04 19:13 ` [Bitcoin-development] " Ron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANEZrP18nf0oK6fbnE59opXxfMdwiOOu4v99iGyXyGo_7NLuYA@mail.gmail.com \
    --to=mike@plan99$(echo .)net \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=rdwnj@yahoo$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox