<?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: How Ocaml Can Be Improved</title>
	<atom:link href="http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/feed/" rel="self" type="application/rss+xml" />
	<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/</link>
	<description>Robert Fischer and Brian Hurt on Punditry, Programming Languages, and Other Religious Issues</description>
	<pubDate>Sat, 05 Jul 2008 18:44:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: OldCoder</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33253</link>
		<dc:creator>OldCoder</dc:creator>
		<pubDate>Tue, 20 May 2008 22:10:14 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33253</guid>
		<description>In my youth, I programed on remote mainframes in FORTRAN (being an acronym, FORTRAN should be capitalized), where you would submit your batch job to compile your code and some time later (days) a printed listing would appear in your mail box.  I especially liked those compilers which produced the printed listing of my code with indentation which reflected what it, the compiler, thought the syntax was.  So the output would be:
    if (test1) then
        if (test2) then
            expr1
        else
            expr2
and it this was not what you intended, the indentation would help tell you that you forgot an endif.

Using C, C++, Java, et al syntax, I would prefer if the statements had to always be in brackets as
    if (test1) {
        if (test2) {
            expr1
        }
    } else {
        expr2
    }
Doing this, there is no shift-reduce conflict and the code is only very marginally harder to write (a few extra brackets).</description>
		<content:encoded><![CDATA[<p>In my youth, I programed on remote mainframes in FORTRAN (being an acronym, FORTRAN should be capitalized), where you would submit your batch job to compile your code and some time later (days) a printed listing would appear in your mail box.  I especially liked those compilers which produced the printed listing of my code with indentation which reflected what it, the compiler, thought the syntax was.  So the output would be:<br />
    if (test1) then<br />
        if (test2) then<br />
            expr1<br />
        else<br />
            expr2<br />
and it this was not what you intended, the indentation would help tell you that you forgot an endif.</p>
<p>Using C, C++, Java, et al syntax, I would prefer if the statements had to always be in brackets as<br />
    if (test1) {<br />
        if (test2) {<br />
            expr1<br />
        }<br />
    } else {<br />
        expr2<br />
    }<br />
Doing this, there is no shift-reduce conflict and the code is only very marginally harder to write (a few extra brackets).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kuba Ober</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33194</link>
		<dc:creator>Kuba Ober</dc:creator>
		<pubDate>Mon, 12 May 2008 12:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33194</guid>
		<description>Brian re Maciej: Printf wouldn't have the same problems if the order of substitution wasn't hardcoded to be the order of declaration.

Right now, printf does this: "Your name is %s %s", "First", "Last"
It should be doing, say, that: "Your name is %1,s %2,s", "First", "Last"

Then any language where one usually gives Last Name, First Name, can be trivially accommodated ;) The requisite changes to implement it in printf are minor, it's more work to get gcc to actually support it w/o barfing, but it's not astronomical amount of work either.

Qt toolkit has it a tad better: QString("Your name is %1 %2").arg(foo).arg(baz). Although all formatting is given to arg(), which makes it non-localizable, but at least the order can be changed at will...

Cheers!</description>
		<content:encoded><![CDATA[<p>Brian re Maciej: Printf wouldn&#8217;t have the same problems if the order of substitution wasn&#8217;t hardcoded to be the order of declaration.</p>
<p>Right now, printf does this: &#8220;Your name is %s %s&#8221;, &#8220;First&#8221;, &#8220;Last&#8221;<br />
It should be doing, say, that: &#8220;Your name is %1,s %2,s&#8221;, &#8220;First&#8221;, &#8220;Last&#8221;</p>
<p>Then any language where one usually gives Last Name, First Name, can be trivially accommodated ;) The requisite changes to implement it in printf are minor, it&#8217;s more work to get gcc to actually support it w/o barfing, but it&#8217;s not astronomical amount of work either.</p>
<p>Qt toolkit has it a tad better: QString(&#8221;Your name is %1 %2&#8243;).arg(foo).arg(baz). Although all formatting is given to arg(), which makes it non-localizable, but at least the order can be changed at will&#8230;</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33191</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sun, 11 May 2008 20:06:07 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33191</guid>
		<description>Maciej: Printf has the same problems.  I'm not sure what the solution for translating applications- the best solutions I've seen are klunky and hard to work with, and strongly invite programmers to bypass them.  The vast majority I've seen are worse.

Mike Lin: If this is true, then Ocaml + twt is the first language I've heard of that handles this correctly.  From experience, Haskell doesn't- and it's a royal pain in the tush to track down code that looks like it's indented correctly, but isn't.

Greg Moulton: The deal breaker with me and Erlang is the lack of built-in, strong static typing.

John Veer: I've fixed the title.  And, I'll comment: I moved 1500 miles to a strange city in order to use Ocaml professionally- what does that say about my opinion of Ocaml? 

Hamlet D\'Arcy: It may be related- in either case, the idea has been around for a while.  I know that both the HP and IBM C and Fortran compilers have attempts at effectively the same thing.  The problem is that it's damned hard to implement in languages with unrestricted side effects, as proving that the code transformation has the same behavior both before and after is, in the general case, equivalent to the halting problem.</description>
		<content:encoded><![CDATA[<p>Maciej: Printf has the same problems.  I&#8217;m not sure what the solution for translating applications- the best solutions I&#8217;ve seen are klunky and hard to work with, and strongly invite programmers to bypass them.  The vast majority I&#8217;ve seen are worse.</p>
<p>Mike Lin: If this is true, then Ocaml + twt is the first language I&#8217;ve heard of that handles this correctly.  From experience, Haskell doesn&#8217;t- and it&#8217;s a royal pain in the tush to track down code that looks like it&#8217;s indented correctly, but isn&#8217;t.</p>
<p>Greg Moulton: The deal breaker with me and Erlang is the lack of built-in, strong static typing.</p>
<p>John Veer: I&#8217;ve fixed the title.  And, I&#8217;ll comment: I moved 1500 miles to a strange city in order to use Ocaml professionally- what does that say about my opinion of Ocaml? </p>
<p>Hamlet D\&#8217;Arcy: It may be related- in either case, the idea has been around for a while.  I know that both the HP and IBM C and Fortran compilers have attempts at effectively the same thing.  The problem is that it&#8217;s damned hard to implement in languages with unrestricted side effects, as proving that the code transformation has the same behavior both before and after is, in the general case, equivalent to the halting problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: orbitz</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33187</link>
		<dc:creator>orbitz</dc:creator>
		<pubDate>Sat, 10 May 2008 16:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33187</guid>
		<description>Has anyone implemented a pure functional string in Ocaml?  I'm often let down at the quality of the String module in the stdlib of Ocaml.  No fold algorithm? Egads!  It's rather sparse.</description>
		<content:encoded><![CDATA[<p>Has anyone implemented a pure functional string in Ocaml?  I&#8217;m often let down at the quality of the String module in the stdlib of Ocaml.  No fold algorithm? Egads!  It&#8217;s rather sparse.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maciej Katafiasz</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33186</link>
		<dc:creator>Maciej Katafiasz</dc:creator>
		<pubDate>Sat, 10 May 2008 09:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33186</guid>
		<description>I just want to make it clear that iostreams were NOT a good idea, in fact they were one of the worst ideas ever. And it's not only because the C++ implementation sucks, the concept is fundamentally broken on the design level.

In C, I can use gettext to extract strings and translate them, shuffling the order around as needed to accommodate for different languages' grammars. This is impossible in C++, because not only is the message to be translated hacked into contextless pieces, it's also hardcoded into the source, so you have no chance to rearrange it properly. In effect, iostreams fundamentally disallows you to have translated apps. And in this day and era, an IO subsystem that doesn't allow me to create multilingal versions without shipping multiple binaries is just worthless crap, no matter how grand anything else about it might be.</description>
		<content:encoded><![CDATA[<p>I just want to make it clear that iostreams were NOT a good idea, in fact they were one of the worst ideas ever. And it&#8217;s not only because the C++ implementation sucks, the concept is fundamentally broken on the design level.</p>
<p>In C, I can use gettext to extract strings and translate them, shuffling the order around as needed to accommodate for different languages&#8217; grammars. This is impossible in C++, because not only is the message to be translated hacked into contextless pieces, it&#8217;s also hardcoded into the source, so you have no chance to rearrange it properly. In effect, iostreams fundamentally disallows you to have translated apps. And in this day and era, an IO subsystem that doesn&#8217;t allow me to create multilingal versions without shipping multiple binaries is just worthless crap, no matter how grand anything else about it might be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maciej Katafiasz</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33185</link>
		<dc:creator>Maciej Katafiasz</dc:creator>
		<pubDate>Sat, 10 May 2008 09:08:44 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33185</guid>
		<description>I just want to make it clear that iostreams were NOT a good idea, in fact they were one of the worst ideas ever. And it's not only because the C++ implementation sucks, the concept is fundamentally broken on the design level.</description>
		<content:encoded><![CDATA[<p>I just want to make it clear that iostreams were NOT a good idea, in fact they were one of the worst ideas ever. And it&#8217;s not only because the C++ implementation sucks, the concept is fundamentally broken on the design level.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sds</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33181</link>
		<dc:creator>sds</dc:creator>
		<pubDate>Fri, 09 May 2008 19:52:01 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33181</guid>
		<description>most lisps do at least some deforestation</description>
		<content:encoded><![CDATA[<p>most lisps do at least some deforestation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enfranchised Mind &#187; Semipermanent Thoughts</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33174</link>
		<dc:creator>Enfranchised Mind &#187; Semipermanent Thoughts</dc:creator>
		<pubDate>Fri, 09 May 2008 12:24:47 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33174</guid>
		<description>[...] the spirit of Brian&#8217;s super-popular post, WordPress sucks. Now, it&#8217;s better than all the alternatives I&#8217;ve tried out, but [...]</description>
		<content:encoded><![CDATA[<p>[...] the spirit of Brian&#8217;s super-popular post, WordPress sucks. Now, it&#8217;s better than all the alternatives I&#8217;ve tried out, but [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ulf Wiger</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33173</link>
		<dc:creator>Ulf Wiger</dc:creator>
		<pubDate>Fri, 09 May 2008 08:41:08 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33173</guid>
		<description>On #9, isn't it really unconstrained effects in general that makes it difficult to apply deforrestation safely?

Erlang doesn't have mutable data, and has only a limited number of ways to perform effects, but since any call to another module is potentially unsafe (even, due to dynamic code loading, it isn't at compile time), you'd only ever be able to apply deforrestation on code that completely resides in one module, and is completely free of dangerous constructs (side effects).</description>
		<content:encoded><![CDATA[<p>On #9, isn&#8217;t it really unconstrained effects in general that makes it difficult to apply deforrestation safely?</p>
<p>Erlang doesn&#8217;t have mutable data, and has only a limited number of ways to perform effects, but since any call to another module is potentially unsafe (even, due to dynamic code loading, it isn&#8217;t at compile time), you&#8217;d only ever be able to apply deforrestation on code that completely resides in one module, and is completely free of dangerous constructs (side effects).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Lin</title>
		<link>http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/#comment-33171</link>
		<dc:creator>Mike Lin</dc:creator>
		<pubDate>Fri, 09 May 2008 02:19:06 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=395#comment-33171</guid>
		<description>There are reasonable arguments against indentation-based syntax, but as James Justin Harrell points out, the particular one brought up on this post is trivially addressed. FWIW, ocaml+twt prints a warning when it sees mixed tab and space indentation, and you can pass a flag to make it accept only one or the other.</description>
		<content:encoded><![CDATA[<p>There are reasonable arguments against indentation-based syntax, but as James Justin Harrell points out, the particular one brought up on this post is trivially addressed. FWIW, ocaml+twt prints a warning when it sees mixed tab and space indentation, and you can pass a flag to make it accept only one or the other.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
