<div dir="ltr">Anyway, Type checking is essentially an application of set theory : (I did no search in te literature for this, It is just my perception). When I say š (+) :: Num a =&gt; a -&gt; a -&gt; a . I mean that (+) takes two elements of the set of Num typeclass and return another. This is in principle a weak restriction, because many functions do it as well, for example (*). š<div>

<br></div><div>A propery check or a contract would be much more restrictive and thus would detect much more program errors. But it seems that no other language but haskell took this set theoreticalšanalysisšso exhaustively, and without it, a property check is like detecting microscopic cracks in nuclear waste vessel without first making sure that the cover has been sealed.</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/2 MigMit <span dir="ltr">&lt;<a href="mailto:miguelimo38@yandex.ru" target="_blank">miguelimo38@yandex.ru</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
On Jan 3, 2013, at 2:09 AM, Gershom Bazerman &lt;<a href="mailto:gershomb@gmail.com">gershomb@gmail.com</a>&gt; wrote:<br>
<br>
&gt; On 1/2/13 4:29 PM, MigMit wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; BTW. Why you think that Eiffel type system is unsafe?<br>
&gt;&gt; Well, if I remember correctly, if you call some method of a certain object, and this call compiles, you can&#39;t be certain that this object actually has this method. Could be that this object belongs to some subclass which removes this method.<br>


&gt;&gt;<br>
&gt;<br>
&gt; Eiffel doesn&#39;t handle the relationship of co- and contra-variance of arguments with subtyping in a principled way. This is apparently known as the &quot;catcall&quot; problem. See, e.g., this article: <a href="http://www.eiffelroom.org/node/517" target="_blank">http://www.eiffelroom.org/node/517</a><br>


<br>
</div>Yes, variance is another big source of unsafety, that&#39;s for sure. And another reason I think there is no real &quot;theory&quot; behind Eiffel, just a bunch of features (or &quot;concepts&quot;) boiled together.<br>


<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Alberto.
</div>