<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: OCaml for the recovering Java programmer, part 1: objects and subtyping</title>
	<atom:link href="http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/feed" rel="self" type="application/rss+xml" />
	<link>http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping</link>
	<description>Your Cell Phone Online</description>
	<lastBuildDate>Thu, 04 Mar 2010 02:47:06 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nels Beckman</title>
		<link>http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/comment-page-1#comment-624</link>
		<dc:creator>Nels Beckman</dc:creator>
		<pubDate>Tue, 17 Feb 2009 22:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/#comment-624</guid>
		<description>Interesting! I am fascinated by the co-variance/contra-variance declarations.

Of course now that we have generics in Java, we can write your identity function with the proper return type, albeit with way cruftier syntax.

Samuel, what you describe is a like the classic, &quot;Cowboy.draw() vs. Image.draw()&quot; argument in the OO world. In my opinion, structural subtyping promotes unintended reuse. In a real program, the type of the draw() method, at least in a functional setting, should make it clear in which contexts it should and should not be used. I think that using this argument against structural subtyping is a little like arguing against first-class functions, on the basis that two functions with the same signature are not necessarily substitutable.</description>
		<content:encoded><![CDATA[<p>Interesting! I am fascinated by the co-variance/contra-variance declarations.</p>
<p>Of course now that we have generics in Java, we can write your identity function with the proper return type, albeit with way cruftier syntax.</p>
<p>Samuel, what you describe is a like the classic, &#8220;Cowboy.draw() vs. Image.draw()&#8221; argument in the OO world. In my opinion, structural subtyping promotes unintended reuse. In a real program, the type of the draw() method, at least in a functional setting, should make it clear in which contexts it should and should not be used. I think that using this argument against structural subtyping is a little like arguing against first-class functions, on the basis that two functions with the same signature are not necessarily substitutable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/comment-page-1#comment-623</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Mon, 29 Sep 2008 14:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/#comment-623</guid>
		<description>The main problem with Ocaml is the lack of
libraries to do various things,

But take a  look at microsoft&#039;s F# --
Recently, F# became a first-class citizen
of the .NET
family of langugages. F# compiles ocaml, and provides access to ALL of the .NET
libraries making it powerful. With full
Visual Studio integration and scriping capabilities, there is nothing stopping it.</description>
		<content:encoded><![CDATA[<p>The main problem with Ocaml is the lack of<br />
libraries to do various things,</p>
<p>But take a  look at microsoft&#8217;s F# &#8211;<br />
Recently, F# became a first-class citizen<br />
of the .NET<br />
family of langugages. F# compiles ocaml, and provides access to ALL of the .NET<br />
libraries making it powerful. With full<br />
Visual Studio integration and scriping capabilities, there is nothing stopping it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Jager</title>
		<link>http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/comment-page-1#comment-622</link>
		<dc:creator>Ivan Jager</dc:creator>
		<pubDate>Wed, 05 Sep 2007 15:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/#comment-622</guid>
		<description>That should be, &quot;Rather than saying &lt;legs:int; ..&gt; you could instead say #pet.&quot;

(I wasn&#039;t sure how this thing would treat angle brackets.)</description>
		<content:encoded><![CDATA[<p>That should be, &#8220;Rather than saying &lt;legs:int; ..&gt; you could instead say #pet.&#8221;</p>
<p>(I wasn&#8217;t sure how this thing would treat angle brackets.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Jager</title>
		<link>http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/comment-page-1#comment-621</link>
		<dc:creator>Ivan Jager</dc:creator>
		<pubDate>Wed, 05 Sep 2007 15:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/#comment-621</guid>
		<description>It may be worth mentioning the subclass syntax. Rather than saying  you could instead say #pet . This is especially useful when you have more complicated classes.</description>
		<content:encoded><![CDATA[<p>It may be worth mentioning the subclass syntax. Rather than saying  you could instead say #pet . This is especially useful when you have more complicated classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel A. Falvo II</title>
		<link>http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/comment-page-1#comment-620</link>
		<dc:creator>Samuel A. Falvo II</dc:creator>
		<pubDate>Wed, 22 Aug 2007 18:06:19 +0000</pubDate>
		<guid isPermaLink="false">http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/#comment-620</guid>
		<description>This article actually only confuses me further.  Although I&#039;m not coding in OCaml, I do code in Haskell, and I fail utterly to see the value of duck typing.  In a sense, the closest I can think of is that it is &quot;automatically generated type classes.&quot;

But this is pretty bad -- I can think of plenty of animals that have legs, but which are NOT pets, and therefore, should NEVER appear in a list of pets.  Yet, by this article&#039;s contents, it is not possible to enforce this constraint with OCaml&#039;s static type system.

Haskell&#039;s typeclasses are explicitly defined, and therefore, gives the programmer a much finer grain of control over what people can do, or perhaps more importantly, cannot do, with their types.</description>
		<content:encoded><![CDATA[<p>This article actually only confuses me further.  Although I&#8217;m not coding in OCaml, I do code in Haskell, and I fail utterly to see the value of duck typing.  In a sense, the closest I can think of is that it is &#8220;automatically generated type classes.&#8221;</p>
<p>But this is pretty bad &#8212; I can think of plenty of animals that have legs, but which are NOT pets, and therefore, should NEVER appear in a list of pets.  Yet, by this article&#8217;s contents, it is not possible to enforce this constraint with OCaml&#8217;s static type system.</p>
<p>Haskell&#8217;s typeclasses are explicitly defined, and therefore, gives the programmer a much finer grain of control over what people can do, or perhaps more importantly, cannot do, with their types.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Butler</title>
		<link>http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/comment-page-1#comment-619</link>
		<dc:creator>Paul Butler</dc:creator>
		<pubDate>Wed, 22 Aug 2007 13:57:25 +0000</pubDate>
		<guid isPermaLink="false">http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/#comment-619</guid>
		<description>Good article.

As someone who is learning ocaml after learning imperative programming (mostly in Java), I am still not really comfortable with the idea of duck typing in a statically typed language, but the idea is growing on me, and this article helped with that.</description>
		<content:encoded><![CDATA[<p>Good article.</p>
<p>As someone who is learning ocaml after learning imperative programming (mostly in Java), I am still not really comfortable with the idea of duck typing in a statically typed language, but the idea is growing on me, and this article helped with that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Neumann</title>
		<link>http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/comment-page-1#comment-618</link>
		<dc:creator>Michael Neumann</dc:creator>
		<pubDate>Wed, 22 Aug 2007 08:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://skydeck.com/blog/programming/ocaml-for-the-recovering-java-programmer-part-1-objects-and-subtyping/#comment-618</guid>
		<description>There is a german (?) story for children about rabbits and hedgehogs. They make a foot race. Of course the rabbit thinks he will win, because he can run faster. But the hedgehog is actually more intelligent, because his woman-hedgehog waits at the goal, and as the rabbit cannot distinguish her from her husband, the rabbit thinks that the hedgehog has won the race.

This proves that hedgehogs are more intelligent than rabbits. So I&#039;d say, Java is a rabbit ;-). And Ruby is a hedgehog ;-)</description>
		<content:encoded><![CDATA[<p>There is a german (?) story for children about rabbits and hedgehogs. They make a foot race. Of course the rabbit thinks he will win, because he can run faster. But the hedgehog is actually more intelligent, because his woman-hedgehog waits at the goal, and as the rabbit cannot distinguish her from her husband, the rabbit thinks that the hedgehog has won the race.</p>
<p>This proves that hedgehogs are more intelligent than rabbits. So I&#8217;d say, Java is a rabbit <img src='http://skydeck.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . And Ruby is a hedgehog <img src='http://skydeck.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
