On Mon, Feb 9, 2009 at 4:38 AM, Tony Morris <span dir="ltr">&lt;<a href="mailto:tmorris@tmorris.net">tmorris@tmorris.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
</div>I also agree it is a value.<br>
The original post was attempting to make a distinction that does not<br>
exist. I deliberately avoided that topic.<br>
<div class="Ih2E3d"><br>
&quot;A thing cannot be both a value and a function, but e,g, getChar&quot;<br>
<br>
</div>My original intent was to hope the poster reconsidered the whole post.<br>
You&#39;ve blown my cover :)<br></blockquote><div><br>My bad, I restate:&nbsp; a value cannot be both static and dynamic.&nbsp; Or an object and a morphism.&nbsp; Or an element and a function.&nbsp; Sure, you can treat a morphism as an object, but only by moving to a higher (or different) level of abstraction.&nbsp; That doesn&#39;t erase the difference between object and morphism.&nbsp; If you do erase that difference you end up with mush.&nbsp; getChar /looks/ like an object, but semantically it must be a morphism.&nbsp; But it can&#39;t be a function, since it is non-deterministic. &nbsp; So actually the logical contradiction comes from the nature of the beast.<br>
<br>Another reason it&#39;s confusing to newcomers:&nbsp; it&#39;s typed as &quot;IO Char&quot;, which looks like a type constructor.&nbsp; One would expect getChar to yield a value of type IO Char, no?&nbsp; But it delivers a Char instead.&nbsp; This is way confusing.&nbsp; So I take &quot;type IO foo&quot; to mean &quot;type foo, after a side effect&quot;.&nbsp; In a sense &quot;getChar :: IO Char&quot; isn&#39;t even a true type signature.<br>
<br>In any case, many thanks to all who have contributed to the thread.&nbsp; It&#39;s sharpened my thinking revealed weaknesses in my terminology, and I expect I&#39;ll make my inevitable contribution to the infinite Haskell tutorial on the topic before too long.<br>
<br>-gregg<br></div></div>