<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Alberto G. Corona</b> <span dir="ltr"><<a href="mailto:agocorona@gmail.com">agocorona@gmail.com</a>></span><br>
Date: 2008/12/19<br>Subject: Re: Fwd: [Haskell-cafe] Haskell as a religion<br>To: Dan Piponi <<a href="mailto:dpiponi@gmail.com">dpiponi@gmail.com</a>><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,
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 const a=1; const b=a
perform a copy of content of a to b . In haskell a=1; b=a 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"> </span><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""></span></p>
<div class="gmail_quote">2008/12/19 Dan Piponi <span dir="ltr"><<a href="mailto:dpiponi@gmail.com" target="_blank">dpiponi@gmail.com</a>></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>
<<a href="mailto:schlepptop@henning-thielemann.de" target="_blank">schlepptop@henning-thielemann.de</a>> wrote:<br>
<br>
</div><div>> In C/C++ referential transparent functions code can be declared by<br>
> appending a 'const' 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'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>