<?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"
	>
<channel>
	<title>Comments on: Programming Languages are PC OSs circa 1986</title>
	<atom:link href="http://enfranchisedmind.com/blog/posts/programming-languages-are-pc-oss-circa-1986/feed/" rel="self" type="application/rss+xml" />
	<link>http://enfranchisedmind.com/blog/posts/programming-languages-are-pc-oss-circa-1986/</link>
	<description>programming, politics, &#38; other religious issues</description>
	<lastBuildDate>Mon, 15 Mar 2010 00:31:40 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Marc Stock</title>
		<link>http://enfranchisedmind.com/blog/posts/programming-languages-are-pc-oss-circa-1986/#comment-33767</link>
		<dc:creator>Marc Stock</dc:creator>
		<pubDate>Wed, 01 Oct 2008 15:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=786#comment-33767</guid>
		<description>&quot;DSLs exist in their own driving context, which should eliminate the surprises.&quot;

To a point, but it doesn&#039;t fix the problem because when you&#039;re applying an operator to something, you should know the context as well.  I don&#039;t think context is the big issue here.  It&#039;s interpretation of how said operator should function given that context.  Depending on how you design a DSL, it could be subject to many questions of this nature (which is why a lot of people are saying you shouldn&#039;t make a DSL very natural language-like).</description>
		<content:encoded><![CDATA[<p>&#8220;DSLs exist in their own driving context, which should eliminate the surprises.&#8221;</p>
<p>To a point, but it doesn&#8217;t fix the problem because when you&#8217;re applying an operator to something, you should know the context as well.  I don&#8217;t think context is the big issue here.  It&#8217;s interpretation of how said operator should function given that context.  Depending on how you design a DSL, it could be subject to many questions of this nature (which is why a lot of people are saying you shouldn&#8217;t make a DSL very natural language-like).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Fischer</title>
		<link>http://enfranchisedmind.com/blog/posts/programming-languages-are-pc-oss-circa-1986/#comment-33766</link>
		<dc:creator>Robert Fischer</dc:creator>
		<pubDate>Wed, 01 Oct 2008 15:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=786#comment-33766</guid>
		<description>The problem with operator overloading is mixing and matching contexts -- what &quot;+&quot; means in one place vs. another is context-driven, and so mismatched contexts can cause surprising results.  DSLs exist in their own driving context, which should eliminate the surprises.</description>
		<content:encoded><![CDATA[<p>The problem with operator overloading is mixing and matching contexts &#8212; what &#8220;+&#8221; means in one place vs. another is context-driven, and so mismatched contexts can cause surprising results.  DSLs exist in their own driving context, which should eliminate the surprises.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Stock</title>
		<link>http://enfranchisedmind.com/blog/posts/programming-languages-are-pc-oss-circa-1986/#comment-33765</link>
		<dc:creator>Marc Stock</dc:creator>
		<pubDate>Wed, 01 Oct 2008 15:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=786#comment-33765</guid>
		<description>I used to do C++ programming many years ago.  Back then, operator overloading was generally frowned upon because the C++ world went through an era where it was heavily overused (new toy!) and even in cases where it was appropriate, the effects of the overloading were often not what was expected.  Method names that clearly indicated the function to be performed became far more preferred.  The &#039;+&#039; symbol can mean different things to different people.  Add to this the fact that (at least at that time -- I don&#039;t know if it&#039;s changed) IDEs didn&#039;t have javadoc like support for operators and it just wasn&#039;t pretty.  Operator overloading is great when it&#039;s very clear what the operator should be doing given the context but outside of basic math, those opportunities are rare.  That said, using operator overloading can be thought of as sort of a DSL Lite and if the developer community cannot handle that, can it really handle full blown DSLs?</description>
		<content:encoded><![CDATA[<p>I used to do C++ programming many years ago.  Back then, operator overloading was generally frowned upon because the C++ world went through an era where it was heavily overused (new toy!) and even in cases where it was appropriate, the effects of the overloading were often not what was expected.  Method names that clearly indicated the function to be performed became far more preferred.  The &#8216;+&#8217; symbol can mean different things to different people.  Add to this the fact that (at least at that time &#8212; I don&#8217;t know if it&#8217;s changed) IDEs didn&#8217;t have javadoc like support for operators and it just wasn&#8217;t pretty.  Operator overloading is great when it&#8217;s very clear what the operator should be doing given the context but outside of basic math, those opportunities are rare.  That said, using operator overloading can be thought of as sort of a DSL Lite and if the developer community cannot handle that, can it really handle full blown DSLs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Fischer</title>
		<link>http://enfranchisedmind.com/blog/posts/programming-languages-are-pc-oss-circa-1986/#comment-33764</link>
		<dc:creator>Robert Fischer</dc:creator>
		<pubDate>Tue, 30 Sep 2008 15:47:25 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=786#comment-33764</guid>
		<description>@Scott Vokes

The syntactic sugar that Java did -- basically proving some low-level operator overloading for integer and floating point arithmetic -- seemed to be a nice compromise between general-case operator overloading (evil[1]) and universal operational purity (off-putting).  Surprisingly, I&#039;ve heard very few people lamenting the inability to define + for matrices in Java.  The one downside is that there comes a point in every journeyman Java developer&#039;s life where they get confused about why 1 / 7.0 * 7 &gt; 1 -- the reality is that floating point and integer arithmetic are fundamentally different, so mixing the two is a Devil&#039;s bargain: you don&#039;t put off beginners used to blurring those boundaries, but you put off intermediate developers who suddenly discovered that there&#039;s a lot of dangerous plays.  Of course, by the time they&#039;re intermediate developers, you&#039;ve already suckered them into knowing your language pretty well, so they&#039;re vested.

[1] The biggest evil of general-case operator overloading is that changing &lt;code&gt;foo + bar&lt;/code&gt; to &lt;code&gt;bar + foo&lt;/code&gt; suddenly drastically changes the definition of &quot;&lt;code&gt;+&lt;/code&gt;&quot;.  It gets even worse when you consider &lt;code&gt;foo * (bar + baz)&lt;/code&gt; vs. &lt;code&gt;foo * bar + foo * baz&lt;/code&gt;.  Or, y&#039;know, &lt;code&gt;1 / 7.0 * 7&lt;/code&gt; vs. &lt;code&gt;7 * 1 / 7.0&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>@Scott Vokes</p>
<p>The syntactic sugar that Java did &#8212; basically proving some low-level operator overloading for integer and floating point arithmetic &#8212; seemed to be a nice compromise between general-case operator overloading (evil[1]) and universal operational purity (off-putting).  Surprisingly, I&#8217;ve heard very few people lamenting the inability to define + for matrices in Java.  The one downside is that there comes a point in every journeyman Java developer&#8217;s life where they get confused about why 1 / 7.0 * 7 &gt; 1 &#8212; the reality is that floating point and integer arithmetic are fundamentally different, so mixing the two is a Devil&#8217;s bargain: you don&#8217;t put off beginners used to blurring those boundaries, but you put off intermediate developers who suddenly discovered that there&#8217;s a lot of dangerous plays.  Of course, by the time they&#8217;re intermediate developers, you&#8217;ve already suckered them into knowing your language pretty well, so they&#8217;re vested.</p>
<p>[1] The biggest evil of general-case operator overloading is that changing <code>foo + bar</code> to <code>bar + foo</code> suddenly drastically changes the definition of &#8220;<code>+</code>&#8220;.  It gets even worse when you consider <code>foo * (bar + baz)</code> vs. <code>foo * bar + foo * baz</code>.  Or, y&#8217;know, <code>1 / 7.0 * 7</code> vs. <code>7 * 1 / 7.0</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Fischer</title>
		<link>http://enfranchisedmind.com/blog/posts/programming-languages-are-pc-oss-circa-1986/#comment-33763</link>
		<dc:creator>Robert Fischer</dc:creator>
		<pubDate>Tue, 30 Sep 2008 15:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/?p=786#comment-33763</guid>
		<description>@Scott Vokes

Excellent point on SS.  Here&#039;s a very verbose +1:

The interchangeable map access/property access aspect of Groovy (indeed, the entire mostly-orthogonal properties/methods approach) has drastically extended the capabilities for mocking and dynamic typing in that language, even compared to other dynamic languages like Ruby.  If you&#039;re testing a method that looks like:

&lt;pre lang=&quot;Groovy&quot;&gt;
   void foo(bar) {
     bar.baz()
     bar.val++
   }
&lt;/pre&gt;

You can test &quot;bar&quot; with:
&lt;pre lang=&quot;Groovy&quot;&gt;
def bar = [val:0]
def bazCalled = false
bar.baz = { bazCalled = true }
obj.foo(bar)
assertEquals(bar,1)
assertEquals(bazCalled, true)
&lt;/pre&gt;

That&#039;s simply not a possible approach in languages without that shortcut.

Similarly, I first started getting into functional programming (without really knowing what it was) in Perl, because subroutine references and &quot;method templating&quot; were so easy to do.

&lt;pre lang=&quot;Perl&quot;&gt;
my $x = sub { ... }
&lt;/pre&gt;

Because of that, entirely knew ways of meta-programming structures seemed natural, including having objects that were basically just thinly-veiled subroutine references (see my &lt;a href=&quot;http://search.cpan.org/src/CHIA/Regexp-Tr-0.05/Tr.pm&quot; rel=&quot;nofollow&quot;&gt;Regexp::Tr&lt;/a&gt; library), and then data structures of thinly-veiled subroutine references (see my &lt;a href=&quot;http://search.cpan.org/src/CHIA/Text-Shift-1.00/Shift.pm&quot; rel=&quot;nofollow&quot;&gt;Text::Shift&lt;/a&gt; library).</description>
		<content:encoded><![CDATA[<p>@Scott Vokes</p>
<p>Excellent point on SS.  Here&#8217;s a very verbose +1:</p>
<p>The interchangeable map access/property access aspect of Groovy (indeed, the entire mostly-orthogonal properties/methods approach) has drastically extended the capabilities for mocking and dynamic typing in that language, even compared to other dynamic languages like Ruby.  If you&#8217;re testing a method that looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;">   <span style="color: #993333;">void</span> foo<span style="color: #66cc66;">&#40;</span>bar<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
     bar.<span style="color: #006600;">baz</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
     bar.<span style="color: #006600;">val</span><span style="color: #66cc66;">++</span>
   <span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>You can test &#8220;bar&#8221; with:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">def</span> bar <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#91;</span>val:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #000000; font-weight: bold;">def</span> bazCalled <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">false</span>
bar.<span style="color: #006600;">baz</span> <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span> bazCalled <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#125;</span>
obj.<span style="color: #006600;">foo</span><span style="color: #66cc66;">&#40;</span>bar<span style="color: #66cc66;">&#41;</span>
assertEquals<span style="color: #66cc66;">&#40;</span>bar,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
assertEquals<span style="color: #66cc66;">&#40;</span>bazCalled, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>That&#8217;s simply not a possible approach in languages without that shortcut.</p>
<p>Similarly, I first started getting into functional programming (without really knowing what it was) in Perl, because subroutine references and &#8220;method templating&#8221; were so easy to do.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$x</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">...</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Because of that, entirely knew ways of meta-programming structures seemed natural, including having objects that were basically just thinly-veiled subroutine references (see my <a href="http://search.cpan.org/src/CHIA/Regexp-Tr-0.05/Tr.pm" rel="nofollow">Regexp::Tr</a> library), and then data structures of thinly-veiled subroutine references (see my <a href="http://search.cpan.org/src/CHIA/Text-Shift-1.00/Shift.pm" rel="nofollow">Text::Shift</a> library).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
