<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
	>
<channel>
	<title>Comments on: My question on Go</title>
	<atom:link href="http://enfranchisedmind.com/blog/posts/my-question-on-go/feed/" rel="self" type="application/rss+xml" />
	<link>http://enfranchisedmind.com/blog/posts/my-question-on-go/</link>
	<description>programming, politics, &#38; other religious issues</description>
	<lastBuildDate>Wed, 08 Feb 2012 14:16:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Brian</title>
		<link>http://enfranchisedmind.com/blog/posts/my-question-on-go/#comment-37042</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sat, 28 Nov 2009 16:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=1997#comment-37042</guid>
		<description>Mental note to self: check for pending comments and approve them before replying.  My apologies, I didn&#039;t mean to ignore your comment, I didn&#039;t see it.

&lt;BLOCKQUOTE&gt;noone cares about a marginally less-fucked version of C++&lt;/BLOCKQUOTE&gt;

Funny, this is exactly my opinion of Go.  Of course, the problem here is:

&lt;BLOCKQUOTE&gt;[Erlang] combines lots of parochial weirdness from both Smalltalk and Prolog (message-passing, image-based live-in sandbox, sentential syntax, etc.) making it very inaccessible to industrial programmers.&lt;/BLOCKQUOTE&gt;

and:

&lt;BLOCKQUOTE&gt;[Go] is so very familiar.&lt;/BLOCKQUOTE&gt;

And then there is this comment:

&lt;BLOCKQUOTE&gt;If you’re trying to teach concurrency, it helps to be able to focus on that alone and not have to address issues that are really about the platform or syntax or evaluation idiom.

You would understand if you’d ever taught Haskell to undergraduates :)&lt;/BLOCKQUOTE&gt;

To my knowledge, I haven&#039;t mentioned teaching at all in this discussion- and it certainly wasn&#039;t what I was thinking about.  Yes, Haskell is a terrible &lt;EM&gt;teaching&lt;/EM&gt; language.  But then I also think that about Ocaml, Java, and C++.  Maybe in their senior year, but not before then.  You don&#039;t learn to fly in a 747 for F16, despite the fact that those are what the professionals fly.  

So, for an industrial language to catch on, it has to be:

&lt;OL&gt;&lt;LI&gt;familiar, by which we mean not very different from Algol-68 or C++, otherwise it&#039;s just too hard to learn,&lt;/LI&gt;&lt;LI&gt;it has to be capable to being taught as a first programming language, because learning a &lt;EM&gt;second&lt;/EM&gt; language is just too hard, and &lt;/LI&gt;&lt;LI&gt;it has to be backed by a giant corporation, because we don&#039;t trust small corporations or long haired hippy hackers (who are way too likely to violate requirement #1).&lt;/LI&gt;&lt;/OL&gt;

Given these requirements, what you&#039;re going to get is slightly less fucked-up C++s.  Always.  Especially from the perspective of someone who is quite willing to roam farther afield, and who doesn&#039;t think that smalltalk is too weird to be learned.</description>
		<content:encoded><![CDATA[<p>Mental note to self: check for pending comments and approve them before replying.  My apologies, I didn&#8217;t mean to ignore your comment, I didn&#8217;t see it.</p>
<blockquote><p>noone cares about a marginally less-fucked version of C++</p></blockquote>
<p>Funny, this is exactly my opinion of Go.  Of course, the problem here is:</p>
<blockquote><p>[Erlang] combines lots of parochial weirdness from both Smalltalk and Prolog (message-passing, image-based live-in sandbox, sentential syntax, etc.) making it very inaccessible to industrial programmers.</p></blockquote>
<p>and:</p>
<blockquote><p>[Go] is so very familiar.</p></blockquote>
<p>And then there is this comment:</p>
<blockquote><p>If you’re trying to teach concurrency, it helps to be able to focus on that alone and not have to address issues that are really about the platform or syntax or evaluation idiom.</p>
<p>You would understand if you’d ever taught Haskell to undergraduates :)</p></blockquote>
<p>To my knowledge, I haven&#8217;t mentioned teaching at all in this discussion- and it certainly wasn&#8217;t what I was thinking about.  Yes, Haskell is a terrible <em>teaching</em> language.  But then I also think that about Ocaml, Java, and C++.  Maybe in their senior year, but not before then.  You don&#8217;t learn to fly in a 747 for F16, despite the fact that those are what the professionals fly.  </p>
<p>So, for an industrial language to catch on, it has to be:</p>
<ol>
<li>familiar, by which we mean not very different from Algol-68 or C++, otherwise it&#8217;s just too hard to learn,</li>
<li>it has to be capable to being taught as a first programming language, because learning a <em>second</em> language is just too hard, and </li>
<li>it has to be backed by a giant corporation, because we don&#8217;t trust small corporations or long haired hippy hackers (who are way too likely to violate requirement #1).</li>
</ol>
<p>Given these requirements, what you&#8217;re going to get is slightly less fucked-up C++s.  Always.  Especially from the perspective of someone who is quite willing to roam farther afield, and who doesn&#8217;t think that smalltalk is too weird to be learned.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://enfranchisedmind.com/blog/posts/my-question-on-go/#comment-37040</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sat, 28 Nov 2009 03:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=1997#comment-37040</guid>
		<description>Technically what Go has is references, like Pascal and Algol-68, not pointers like C and C++.  Yes, I know this.  I&#039;m old enough that they taught me Pascal back when they were teaching me to program (and I still have both my copies of &quot;Oh! Pascal!&quot; on my shelves- good books).

By the way, there are a lot of languages that compile to native code that don&#039;t have the pointer/value distinction- Ocaml and Haskell being two.  Oh, and all those Java native mode compilers, like gcj.

&lt;BLOCKQUOTE&gt;By exposing them, the user can write tight code that making strong assumptions about how data structures are copied, and what kind of memory footprint will result.&lt;/BLOCKQUOTE&gt;

&lt;EM&gt;This is exactly what I&#039;m talking about!&lt;/EM&gt;  It not only allows the programmer low-level control over how the data structures are laid out, and &lt;EM&gt;require the programmer to control how the data structures are laid out, whether the programmer wants to or not!&lt;/EM&gt;

I&#039;d love to point out a compiler that unboxed non-trivial data structures if the compiler thought it worthwhile, but I honestly don&#039;t know any- primarily because it&#039;s generally not worth it.  If you have a copying garbage collector, then if A has a reference to B, generally A and B will be near each other in memory.  So you get most of the cache locality advantage of unboxing B into A right there.  You save some memory- you have the pointer in A and the per-object overhead of B you could eliminate.  But just as often you lose memory, as this forces you to keep multiple copies of B around instead of sharing one B (this is especially true if B is immutable and thus more easily shared).  And you complicate the garbage collector, because now the GC has to look not only for pointers to A, but also to pointers to the B part of A.  And what happens if a reference to the B part of A outlives all references to A- do you hold on to A as well?  The cost/benefit ratio is just too large.

I agree that tail call optimization and pointers both have large impacts on the programming style.  So does limiting variable names to six characters.   Not all things that impact the programming style are good.

Tail call optimization is about correctness in the face of the lack of language features- not about performance.  Loop constructs tend to be imperative in nature.  And they also tend to accrue more complex exit conditions and variations- for vr.s while vr.s repeat vr.s do-while loops with return, break, continue, next, previous, etc. continuations.  So functional languages tend to ditch looping entirely or severely limit it, and use recursion instead (every loop can be implemented as a recursion).  This allows the languages to avoid the complexity most pragmatic imperative languages end up with in their looping constructs.  If you had an infinite stack, you wouldn&#039;t need tail call optimization to do your looping with recursion- but since you don&#039;t, tail call optimization is necessary.  Not for performance.  For correctness.  What&#039;s the similar story for Go- what advantage (other than requiring the programmer to lay out his data structures and deal with boxing explicitly) does Go gain from having pointers?</description>
		<content:encoded><![CDATA[<p>Technically what Go has is references, like Pascal and Algol-68, not pointers like C and C++.  Yes, I know this.  I&#8217;m old enough that they taught me Pascal back when they were teaching me to program (and I still have both my copies of &#8220;Oh! Pascal!&#8221; on my shelves- good books).</p>
<p>By the way, there are a lot of languages that compile to native code that don&#8217;t have the pointer/value distinction- Ocaml and Haskell being two.  Oh, and all those Java native mode compilers, like gcj.</p>
<blockquote><p>By exposing them, the user can write tight code that making strong assumptions about how data structures are copied, and what kind of memory footprint will result.</p></blockquote>
<p><em>This is exactly what I&#8217;m talking about!</em>  It not only allows the programmer low-level control over how the data structures are laid out, and <em>require the programmer to control how the data structures are laid out, whether the programmer wants to or not!</em></p>
<p>I&#8217;d love to point out a compiler that unboxed non-trivial data structures if the compiler thought it worthwhile, but I honestly don&#8217;t know any- primarily because it&#8217;s generally not worth it.  If you have a copying garbage collector, then if A has a reference to B, generally A and B will be near each other in memory.  So you get most of the cache locality advantage of unboxing B into A right there.  You save some memory- you have the pointer in A and the per-object overhead of B you could eliminate.  But just as often you lose memory, as this forces you to keep multiple copies of B around instead of sharing one B (this is especially true if B is immutable and thus more easily shared).  And you complicate the garbage collector, because now the GC has to look not only for pointers to A, but also to pointers to the B part of A.  And what happens if a reference to the B part of A outlives all references to A- do you hold on to A as well?  The cost/benefit ratio is just too large.</p>
<p>I agree that tail call optimization and pointers both have large impacts on the programming style.  So does limiting variable names to six characters.   Not all things that impact the programming style are good.</p>
<p>Tail call optimization is about correctness in the face of the lack of language features- not about performance.  Loop constructs tend to be imperative in nature.  And they also tend to accrue more complex exit conditions and variations- for vr.s while vr.s repeat vr.s do-while loops with return, break, continue, next, previous, etc. continuations.  So functional languages tend to ditch looping entirely or severely limit it, and use recursion instead (every loop can be implemented as a recursion).  This allows the languages to avoid the complexity most pragmatic imperative languages end up with in their looping constructs.  If you had an infinite stack, you wouldn&#8217;t need tail call optimization to do your looping with recursion- but since you don&#8217;t, tail call optimization is necessary.  Not for performance.  For correctness.  What&#8217;s the similar story for Go- what advantage (other than requiring the programmer to lay out his data structures and deal with boxing explicitly) does Go gain from having pointers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred Blasdel</title>
		<link>http://enfranchisedmind.com/blog/posts/my-question-on-go/#comment-37039</link>
		<dc:creator>Fred Blasdel</dc:creator>
		<pubDate>Sat, 28 Nov 2009 01:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=1997#comment-37039</guid>
		<description>&lt;blockquote&gt;I’d be interested to know why, as you comment, “Erlang ain’t it”&lt;/blockquote&gt;
It combines lots of parochial weirdness from both Smalltalk and Prolog (message-passing, image-based live-in sandbox, sentential syntax, etc.) making it very inaccessible to industrial programmers. OTP&#039;s reliability is perfect, but only if you use it as Ericsson intended: it falls over easily if there&#039;s any impedance mismatch in how you architected your system.

Erlang is obviously successful, and will continue to be so for quite a long time, but just in a very narrow category of infrastructure applications.


&lt;blockquote&gt;From where I sit, the three main advantages Go has over various competitors like D and Erlang and Cilk, is threefold: 1, Google, 2, Brian Kerninghan, 3. Rob Pike. In this sense, Go is like Arc, in that the main reason everyone is gaga over it is who is behind the language, not the language itself. If you or I had released Go, it’d have disappeared without a ripple, and no one would care about it. If you don’t believe me, ask Walter Bright. Who’s he? Precisely.&lt;/blockquote&gt;
I already knew all about Walter from having explored D, which seems to have been an obvious failure nearly from birth &#8212; noone cares about a marginally less-fucked version of C++, especially not one controlled by a proprietary compiler company. Cilk manages to apply that same proprietary stink to a project that already had the innate unsuccessfulness of private academia (see Cyclone for a language that never even made that leap).

It&#039;s uncouth to apply the Arc slur to a language that shipped with two full compiler suites targeting many native architectures, with it&#039;s own complete standard library. Arc is ~100kb of shitty macros that only work on an old version of MzScheme and break its string support.


&lt;blockquote&gt;I am more than a little bit disturbed at the implication that the only way for a language to gain widespread adoption is to have it backed by a large corporation.&lt;/blockquote&gt;
I&#039;m saying something else: that a language backed by a tiny corporation is meaningless. I know of three things that can really get a language off the ground: early total openness, backing by a megacorp, and multiple independent implementations.


&lt;blockquote&gt;Yes, as far as I’m concerned, being owned and pushed by a big corporation is a minus for a language. Languages should be open sourced and publicly standardized (ANSI, ISO, ECMA, pick one).&lt;/blockquote&gt;
Have public standardization bodies ever been anything but facilitators for corporate bullying? I guess there are languages for which standardization has been a tombstone &#8212; Smalltalk multiple times!


&lt;blockquote&gt;The existing industrial languages that are otherwise suitable have tons of baggage: Scala, Clojure, Haskell, and Erlang are all idiosyncratic in their own ways, and all have major features that have nothing to do with concurrency.
&lt;blockquote&gt;Are you seriously suggesting that Go is not idiosyncratic in it’s own way?&lt;/blockquote&gt;&lt;/blockquote&gt;
Of course it is, but save for CSP (and maybe interfaces), its oddities are ones of omission and clarification. It is so very &lt;i&gt;familiar&lt;/i&gt;.


&lt;blockquote&gt;Or that every feature has to be related to concurrency? Including all of Go’s features?&lt;/blockquote&gt;
If you&#039;re trying to teach concurrency, it helps to be able to focus on that alone and not have to address issues that are really about the platform or syntax or evaluation idiom.

You would understand if you&#039;d ever taught Haskell to undergraduates :)</description>
		<content:encoded><![CDATA[<blockquote><p>I’d be interested to know why, as you comment, “Erlang ain’t it”</p></blockquote>
<p>It combines lots of parochial weirdness from both Smalltalk and Prolog (message-passing, image-based live-in sandbox, sentential syntax, etc.) making it very inaccessible to industrial programmers. OTP&#8217;s reliability is perfect, but only if you use it as Ericsson intended: it falls over easily if there&#8217;s any impedance mismatch in how you architected your system.</p>
<p>Erlang is obviously successful, and will continue to be so for quite a long time, but just in a very narrow category of infrastructure applications.</p>
<blockquote><p>From where I sit, the three main advantages Go has over various competitors like D and Erlang and Cilk, is threefold: 1, Google, 2, Brian Kerninghan, 3. Rob Pike. In this sense, Go is like Arc, in that the main reason everyone is gaga over it is who is behind the language, not the language itself. If you or I had released Go, it’d have disappeared without a ripple, and no one would care about it. If you don’t believe me, ask Walter Bright. Who’s he? Precisely.</p></blockquote>
<p>I already knew all about Walter from having explored D, which seems to have been an obvious failure nearly from birth &mdash; noone cares about a marginally less-fucked version of C++, especially not one controlled by a proprietary compiler company. Cilk manages to apply that same proprietary stink to a project that already had the innate unsuccessfulness of private academia (see Cyclone for a language that never even made that leap).</p>
<p>It&#8217;s uncouth to apply the Arc slur to a language that shipped with two full compiler suites targeting many native architectures, with it&#8217;s own complete standard library. Arc is ~100kb of shitty macros that only work on an old version of MzScheme and break its string support.</p>
<blockquote><p>I am more than a little bit disturbed at the implication that the only way for a language to gain widespread adoption is to have it backed by a large corporation.</p></blockquote>
<p>I&#8217;m saying something else: that a language backed by a tiny corporation is meaningless. I know of three things that can really get a language off the ground: early total openness, backing by a megacorp, and multiple independent implementations.</p>
<blockquote><p>Yes, as far as I’m concerned, being owned and pushed by a big corporation is a minus for a language. Languages should be open sourced and publicly standardized (ANSI, ISO, ECMA, pick one).</p></blockquote>
<p>Have public standardization bodies ever been anything but facilitators for corporate bullying? I guess there are languages for which standardization has been a tombstone &mdash; Smalltalk multiple times!</p>
<blockquote><p>The existing industrial languages that are otherwise suitable have tons of baggage: Scala, Clojure, Haskell, and Erlang are all idiosyncratic in their own ways, and all have major features that have nothing to do with concurrency.</p>
<blockquote><p>Are you seriously suggesting that Go is not idiosyncratic in it’s own way?</p></blockquote>
</blockquote>
<p>Of course it is, but save for CSP (and maybe interfaces), its oddities are ones of omission and clarification. It is so very <i>familiar</i>.</p>
<blockquote><p>Or that every feature has to be related to concurrency? Including all of Go’s features?</p></blockquote>
<p>If you&#8217;re trying to teach concurrency, it helps to be able to focus on that alone and not have to address issues that are really about the platform or syntax or evaluation idiom.</p>
<p>You would understand if you&#8217;d ever taught Haskell to undergraduates :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred Blasdel</title>
		<link>http://enfranchisedmind.com/blog/posts/my-question-on-go/#comment-37038</link>
		<dc:creator>Fred Blasdel</dc:creator>
		<pubDate>Sat, 28 Nov 2009 00:38:51 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=1997#comment-37038</guid>
		<description>Go has machine pointers but they aren&#039;t what you think they are:

Dereferencing is automatic in common cases
No pointer arithmetic is allowed
No such thing as &lt;i&gt;&quot;undefined behavior&quot;&lt;/i&gt; &#8212; it is possible to manually construct an invalid pointer, but dereferencing one will always cause the runtime to halt


They&#039;re present because you&#039;re going to have to tackle the reference/value distinction somehow, and Go is intended to compile to machine code. By exposing them, the user can write tight code that making strong assumptions about how data structures are copied, and what kind of memory footprint will result.

Pointers are not &quot;just an optimization&quot; &#8212; They&#039;re a lot like Tail-Call Elimination &#8212; theoretically it&#039;s just an implementation detail, but it&#039;s one that has a massive impact on programming style. Any code that takes advantage of it is invalid in its absence and immune to refactoring it out.</description>
		<content:encoded><![CDATA[<p>Go has machine pointers but they aren&#8217;t what you think they are:</p>
<p>Dereferencing is automatic in common cases<br />
No pointer arithmetic is allowed<br />
No such thing as <i>&#8220;undefined behavior&#8221;</i> &mdash; it is possible to manually construct an invalid pointer, but dereferencing one will always cause the runtime to halt</p>
<p>They&#8217;re present because you&#8217;re going to have to tackle the reference/value distinction somehow, and Go is intended to compile to machine code. By exposing them, the user can write tight code that making strong assumptions about how data structures are copied, and what kind of memory footprint will result.</p>
<p>Pointers are not &#8220;just an optimization&#8221; &mdash; They&#8217;re a lot like Tail-Call Elimination &mdash; theoretically it&#8217;s just an implementation detail, but it&#8217;s one that has a massive impact on programming style. Any code that takes advantage of it is invalid in its absence and immune to refactoring it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred Blasdel</title>
		<link>http://enfranchisedmind.com/blog/posts/my-question-on-go/#comment-37037</link>
		<dc:creator>Fred Blasdel</dc:creator>
		<pubDate>Sat, 28 Nov 2009 00:19:12 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=1997#comment-37037</guid>
		<description>NaCL has some odd security properties: it is effectively a bitcode VM that happens to directly use your physical processor for execution (after full code verification). It doesn&#039;t let you do unaligned pointer arithmetic, or real interrupts, or make any OS syscalls. It provides its own well-considered syscall-style API, and that&#039;s the only communication mechanism you get.

Unfortunately it does suffer from a most intractable problem &#8212; &lt;b&gt;timing attacks&lt;/b&gt;. Because your code runs directly, you can do things like detect the contents of the CPU&#039;s caches by brute force. Researchers have written timing-based exploits for NaCL, but noone&#039;s found any other ways through the sandbox.

The JVM&#039;s massive girth and added latency make this a lot more difficult due to all the introduced noise, but it&#039;s still possible. That girth also makes it incredibly hard to write nice applets in.</description>
		<content:encoded><![CDATA[<p>NaCL has some odd security properties: it is effectively a bitcode VM that happens to directly use your physical processor for execution (after full code verification). It doesn&#8217;t let you do unaligned pointer arithmetic, or real interrupts, or make any OS syscalls. It provides its own well-considered syscall-style API, and that&#8217;s the only communication mechanism you get.</p>
<p>Unfortunately it does suffer from a most intractable problem &mdash; <b>timing attacks</b>. Because your code runs directly, you can do things like detect the contents of the CPU&#8217;s caches by brute force. Researchers have written timing-based exploits for NaCL, but noone&#8217;s found any other ways through the sandbox.</p>
<p>The JVM&#8217;s massive girth and added latency make this a lot more difficult due to all the introduced noise, but it&#8217;s still possible. That girth also makes it incredibly hard to write nice applets in.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

