<div dir="ltr">On Wed, Jun 4, 2014 at 2:51 AM, Mike Hearn <span dir="ltr">&lt;<a href="mailto:mike@plan99.net" target="_blank">mike@plan99.net</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Ron,<div><br></div><div>FYI your mail is being spamfoldered due to Yahoo&#39;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&#39;s this list that&#39;s at fault not Yahoo, but until then you may wish to send to the list with a different email address.</div>

<div><br></div><div>As to your question,</div><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:10pt">

<div><div><div style="color:#000;background-color:#fff;font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:10pt"><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:Courier New,courier,monaco,monospace,sans-serif;background-color:transparent;font-style:normal">

<tt>assert() </tt>should have <span style="text-decoration:underline"><b>no</b></span> side effects, that is the problem.<br><br>See<br><a rel="nofollow" href="http://books.google.com/books?id=L5ZbzVnpkXAC&amp;pg=PA72&amp;lpg=PA72&amp;dq=Gotcha+%2328+Side+Effects&amp;source=bl&amp;ots=Rn15TlPmje&amp;sig=tymHqta0aSANwaM2GaXC-1Di_tk&amp;hl=en&amp;sa=X&amp;ei=uVKNU47fCcvTsAT6goHIBA&amp;ved=0CCAQ6AEwAA#v=onepage&amp;q=Gotcha%20%2328%20Side%20Effects&amp;f=false" target="_blank">http://books.google.com/books?id=L5ZbzVnpkXAC&amp;pg=PA72&amp;lpg=PA72&amp;dq=Gotcha+%2328+Side+Effects&amp;source=bl&amp;ots=Rn15TlPmje&amp;sig=tymHqta0aSANwaM2GaXC-1Di_tk&amp;hl=en&amp;sa=X&amp;ei=uVKNU47fCcvTsAT6goHIBA&amp;ved=0CCAQ6AEwAA#v=onepage&amp;q=Gotcha%20%2328%20Side%20Effects&amp;f=false</a><br>

<br>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&#39;t know Jack <img alt="Roll Eyes" border="0"></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:Courier New,courier,monaco,monospace,sans-serif;background-color:transparent;font-style:normal">
<br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:Courier New,courier,monaco,monospace,sans-serif;background-color:transparent;font-style:normal">Why weren&#39;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? <br></div></div></div></div></div></div></blockquote><div><br></div><div>Back in 2010 most code was still being written by Satoshi so perhaps you should ask him. Regardless, it&#39;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&#39;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.</div>

<div><br></div><div>So for this reason I think Bitcoin Core currently will fail to build if assertions are disabled, and that seems OK to me.</div></div></div></div></blockquote><div><br></div><div>As a matter of procedure we do not use assertions with side effects— 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&#39;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.<br>
<br></div><div>Considering the normal criticality of the software it should always be with the assertions. Without them is an untested configuration.  It would probably be superior to use our own assertion macros (for one, they can give some better reporting…) that don&#39;t have the baggage ordinary assertions have, but as a the codebase is a production thing, making larger changes all at once to satisfy aesthetics would be unwise... simply refusing to compile in that untested, unsupported configuration is prudent, for the time being.<br>
<br></div></div></div></div>