<?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"
	>
<channel>
	<title>Comments on: Objective Caml</title>
	<atom:link href="http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/</link>
	<description>Tilting at Windmills Since 1970</description>
	<pubDate>Fri, 21 Nov 2008 23:00:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Jon Harrop</title>
		<link>http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/#comment-1105</link>
		<dc:creator>Jon Harrop</dc:creator>
		<pubDate>Thu, 05 Jan 2006 16:22:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/#comment-1105</guid>
		<description>I'd like to know what you think of the freely available first chapter of my book &lt;a href="http://www.ffconsultancy.com/products/ocaml_for_scientists/" rel="nofollow"&gt;Objective Caml for Scientists&lt;/a&gt;.

Regarding Reilly Hayes's last comment, using ad-hoc polymorphism to overload the "+" operator, as SML does, is clearly a trade-off, with SML requiring a slight extension to the type system, giving slightly more obfuscated error messages and even introducing discrepancies between the types inferred by different compilers.

You could implement a numeric tower for OCaml using camlp4 but this would give worse performance, complicate interfacing (including with the stdlib) and would only work on a per-source-file basis.</description>
		<content:encoded><![CDATA[<p>I&#8217;d like to know what you think of the freely available first chapter of my book <a href="http://www.ffconsultancy.com/products/ocaml_for_scientists/" rel="nofollow">Objective Caml for Scientists</a>.</p>
<p>Regarding Reilly Hayes&#8217;s last comment, using ad-hoc polymorphism to overload the &#8220;+&#8221; operator, as <span class="caps">SML</span> does, is clearly a trade-off, with <span class="caps">SML</span> requiring a slight extension to the type system, giving slightly more obfuscated error messages and even introducing discrepancies between the types inferred by different compilers.</p>
<p>You could implement a numeric tower for OCaml using camlp4 but this would give worse performance, complicate interfacing (including with the stdlib) and would only work on a per-source-file basis.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reilly Hayes</title>
		<link>http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/#comment-177</link>
		<dc:creator>Reilly Hayes</dc:creator>
		<pubDate>Sat, 22 Jan 2005 17:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/#comment-177</guid>
		<description>OCAML's use of distinct operators for floating and integer arithmentic doesn't have to be a requirement of the strict type system.  SML manages just fine with overloading + for both.</description>
		<content:encoded><![CDATA[<p><span class="caps">OCAML</span>&#8217;s use of distinct operators for floating and integer arithmentic doesn&#8217;t have to be a requirement of the strict type system.  <span class="caps">SML</span> manages just fine with overloading + for both.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KenR</title>
		<link>http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/#comment-9</link>
		<dc:creator>KenR</dc:creator>
		<pubDate>Tue, 05 Oct 2004 02:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/#comment-9</guid>
		<description>I've spent a lot of time with Scheme, so as it turns out I tried pretty hard to get a Lisp (Corman Lisp) working for me for interactive OpenGL development. Unfortunately I wasn't able to get OpenGL/Glut to work with threads in Corman without crashing and in the end I was able to get it working with the bytecode interpreter in OCaml with LablGl.

I do miss the freewheeling nature of runtime type checking with Lisp, especially for prototyping (but my code also seems to have fewer bugs with OCaml, so I suppose it's a tradeoff). I'll probably get a Scheme up &#038; running in OCaml at some point to get some of those advantages back, but the problem then will be getting enough primitives up and running to make it worthwhile to prototype anything (that is one thing I miss about .NET -- while reflection is slow, it does eliminate the need for a Foreign Function Interface).

I've only done really basic things with the OCaml object system so far, but other than the need to manually downcast objects and the poor error reporting for syntax problems for class definitions, I've been fairly happy with it. 

I've never used multimethods, but Mike Vanier had a similar "falling out with OCaml":http://www.cs.caltech.edu/~mvanier/hacking/rants/scalable_computer_programming_languages.html#EPILOGUE over the object system &#038; lack of multimethods support . 

"The Oreilly OCaml book":http://caml.inria.fr/oreilly-book/html/book-ora153.html has an interesting comment about the object system as well:

&lt;em&gt;"There is no class hierarchy in the language distribution. In fact the collection of libraries are supplied in the form of simple or parameterized modules. This demonstrates that the object extension of the language is still stabilizing, and makes little case for its extensive use."&lt;/em&gt;

I haven't tackled camlp4 yet. I go back and forth on macros. On one hand they are indisputably powerful. On the other hand, having a malleable syntax can be quite confusing. In any case, macros are great for implementing Domain Specific Languages -- Shriram Krishnamurthi's automata example in his "The Swine Before Perl":http://ll1.ai.mit.edu/shriram-talk.pdf presentation is pretty compelling.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve spent a lot of time with Scheme, so as it turns out I tried pretty hard to get a Lisp (Corman Lisp) working for me for interactive OpenGL development. Unfortunately I wasn&#8217;t able to get OpenGL/Glut to work with threads in Corman without crashing and in the end I was able to get it working with the bytecode interpreter in OCaml with LablGl.</p>
<p>I do miss the freewheeling nature of runtime type checking with Lisp, especially for prototyping (but my code also seems to have fewer bugs with OCaml, so I suppose it&#8217;s a tradeoff). I&#8217;ll probably get a Scheme up &#38; running in OCaml at some point to get some of those advantages back, but the problem then will be getting enough primitives up and running to make it worthwhile to prototype anything (that is one thing I miss about .NET&#8212;while reflection is slow, it does eliminate the need for a Foreign Function Interface).</p>
<p>I&#8217;ve only done really basic things with the OCaml object system so far, but other than the need to manually downcast objects and the poor error reporting for syntax problems for class definitions, I&#8217;ve been fairly happy with it.</p>
<p>I&#8217;ve never used multimethods, but Mike Vanier had a similar <a href="http://www.cs.caltech.edu/~mvanier/hacking/rants/scalable_computer_programming_languages.html#EPILOGUE" title="">falling out with OCaml</a> over the object system &#38; lack of multimethods support .</p>
<p><a href="http://caml.inria.fr/oreilly-book/html/book-ora153.html" title="">The Oreilly OCaml book</a> has an interesting comment about the object system as well:</p>
<p><em>&#8220;There is no class hierarchy in the language distribution. In fact the collection of libraries are supplied in the form of simple or parameterized modules. This demonstrates that the object extension of the language is still stabilizing, and makes little case for its extensive use.&#8221;</em></p>
<p>I haven&#8217;t tackled camlp4 yet. I go back and forth on macros. On one hand they are indisputably powerful. On the other hand, having a malleable syntax can be quite confusing. In any case, macros are great for implementing Domain Specific Languages&#8212;Shriram Krishnamurthi&#8217;s automata example in his <a href="http://ll1.ai.mit.edu/shriram-talk.pdf" title="">The Swine Before Perl</a> presentation is pretty compelling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph Richard Cook</title>
		<link>http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/#comment-8</link>
		<dc:creator>Ralph Richard Cook</dc:creator>
		<pubDate>Thu, 30 Sep 2004 14:10:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.kenrawlings.com/archives/2004/09/28/objective-caml-a-pythonic-diversion/#comment-8</guid>
		<description>I liked OCaml until I got more into the 'O' part, seeing how they handled FP vs. OO, where you start having things like parameterized classes and other things to handle OO-style polymorphism while still keeping the type system happy. I switched to Common Lisp where I just use multimethods, plus the macro system is much simpler than camlp4.</description>
		<content:encoded><![CDATA[<p>I liked OCaml until I got more into the &#8216;O&#8217; part, seeing how they handled FP vs. OO, where you start having things like parameterized classes and other things to handle OO-style polymorphism while still keeping the type system happy. I switched to Common Lisp where I just use multimethods, plus the macro system is much simpler than camlp4.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
