<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Alberto G. Corona</b> <span dir="ltr">&lt;<a href="mailto:agocorona@gmail.com">agocorona@gmail.com</a>&gt;</span><br>
Date: 2008/12/19<br>Subject: Re: Fwd: [Haskell-cafe] Haskell as a religion<br>To: Dan Piponi &lt;<a href="mailto:dpiponi@gmail.com">dpiponi@gmail.com</a>&gt;<br><br><br><div><p style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal">
<span lang="EN-US" style="font-family:Arial, sans-serif;color:black"><span style="font-size:small">As far as I know,
&nbsp;const only protect from updates that the compiler can detect at
compilation time. Moreover, the C/C++ code does not make use of true
referential transparency properties, for example &nbsp; const a=1; const b=a
&nbsp; perform a copy of content of a to b . In haskell a=1; b=a &nbsp;make b
to point to a directly.</span></span><span lang="EN-US" style="font-size:7.5pt;color:black"></span></p>

<p style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal"><span lang="EN-US" style="font-size:7.5pt;color:black">&nbsp;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"></span></p>
<div class="gmail_quote">2008/12/19 Dan Piponi <span dir="ltr">&lt;<a href="mailto:dpiponi@gmail.com" target="_blank">dpiponi@gmail.com</a>&gt;</span><div><div></div><div class="Wj3C7c"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Thu, Dec 18, 2008 at 4:15 PM, Henning Thielemann<br>
&lt;<a href="mailto:schlepptop@henning-thielemann.de" target="_blank">schlepptop@henning-thielemann.de</a>&gt; wrote:<br>
<br>
</div><div>&gt; In C/C++ referential transparent functions code can be declared by<br>
&gt; appending a &#39;const&#39; to the prototype, right?<br>
<br>
</div>For one thing, some fields in a const C++ object can be explicitly set<br>
mutable. mutable is sometimes used in C++ a similar way to<br>
unsafePerformIO in Haskell. You have something that uses mutability in<br>
its internals but that mutability shouldn&#39;t be observable to the<br>
caller. In both cases you have no means of actually ensuring that the<br>
mutability is actually unobservable.<br>
--<br>
<font color="#888888">Dan<br>
</font></blockquote></div></div></div><br></div>
</div><br>