<?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: Don&#8217;t &#8212; in Scala</title>
	<atom:link href="http://lexandera.com/2009/11/dont-in-scala/feed/" rel="self" type="application/rss+xml" />
	<link>http://lexandera.com/2009/11/dont-in-scala/</link>
	<description>A blog about the web, mobile web, semantic web and mobile semantic web.</description>
	<lastBuildDate>Fri, 19 Feb 2010 23:47:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vince</title>
		<link>http://lexandera.com/2009/11/dont-in-scala/comment-page-1/#comment-2154</link>
		<dc:creator>Vince</dc:creator>
		<pubDate>Wed, 11 Nov 2009 22:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://lexandera.com/?p=553#comment-2154</guid>
		<description>Great article.  This was a really simple explanation of how to write your own control structures in Scala.  More please!</description>
		<content:encoded><![CDATA[<p>Great article.  This was a really simple explanation of how to write your own control structures in Scala.  More please!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleksander Kmetec</title>
		<link>http://lexandera.com/2009/11/dont-in-scala/comment-page-1/#comment-2153</link>
		<dc:creator>Aleksander Kmetec</dc:creator>
		<pubDate>Wed, 11 Nov 2009 17:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://lexandera.com/?p=553#comment-2153</guid>
		<description>@wolverian: Oh, that&#039;s a tough one. I only managed to implement a more polite version, &quot;please don&#039;t&quot;, by jumping through a couple of hoops:

&lt;code&gt;
  object please {
    def don(code: =&gt; Unit) = new DontCommand(code)
  }

  implicit def symbolExtender(s: Symbol) = new { def apply(r: Unit) = () }

  please don&#039;t { 
    println(&quot;HEY HEY HEY!&quot;) 
  } unless (2 &gt; 1)
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@wolverian: Oh, that&#8217;s a tough one. I only managed to implement a more polite version, &#8220;please don&#8217;t&#8221;, by jumping through a couple of hoops:</p>
<p><code><br />
  object please {<br />
    def don(code: =&gt; Unit) = new DontCommand(code)<br />
  }</p>
<p>  implicit def symbolExtender(s: Symbol) = new { def apply(r: Unit) = () }</p>
<p>  please don't {<br />
    println("HEY HEY HEY!")<br />
  } unless (2 &gt; 1)<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wolverian</title>
		<link>http://lexandera.com/2009/11/dont-in-scala/comment-page-1/#comment-2152</link>
		<dc:creator>wolverian</dc:creator>
		<pubDate>Wed, 11 Nov 2009 17:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://lexandera.com/?p=553#comment-2152</guid>
		<description>Now implement &quot;don&#039;t&quot;, like the original code? :)</description>
		<content:encoded><![CDATA[<p>Now implement &#8220;don&#8217;t&#8221;, like the original code? :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleksander Kmetec</title>
		<link>http://lexandera.com/2009/11/dont-in-scala/comment-page-1/#comment-2146</link>
		<dc:creator>Aleksander Kmetec</dc:creator>
		<pubDate>Tue, 10 Nov 2009 19:41:36 +0000</pubDate>
		<guid isPermaLink="false">http://lexandera.com/?p=553#comment-2146</guid>
		<description>That one is left as an exercise to the reader. ;-)

Actually, a simple 
&lt;code&gt;dont {
  dont { 
    println(&quot;Hello there!&quot;) 
  }
}&lt;/code&gt;
is perfectly doable by just adding an overloaded definition of dont, like this: 

&lt;code&gt;def dont(dontExecCode: DontCommand) = dontExecCode.unless(true)&lt;/code&gt;

But this only works if the outer dont block doesn&#039;t contain anything else than another dont block and there also can&#039;t be any unless/until conditions.</description>
		<content:encoded><![CDATA[<p>That one is left as an exercise to the reader. ;-)</p>
<p>Actually, a simple<br />
<code>dont {<br />
  dont {<br />
    println("Hello there!")<br />
  }<br />
}</code><br />
is perfectly doable by just adding an overloaded definition of dont, like this: </p>
<p><code>def dont(dontExecCode: DontCommand) = dontExecCode.unless(true)</code></p>
<p>But this only works if the outer dont block doesn&#8217;t contain anything else than another dont block and there also can&#8217;t be any unless/until conditions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matjaž Lipuš</title>
		<link>http://lexandera.com/2009/11/dont-in-scala/comment-page-1/#comment-2145</link>
		<dc:creator>Matjaž Lipuš</dc:creator>
		<pubDate>Tue, 10 Nov 2009 19:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://lexandera.com/?p=553#comment-2145</guid>
		<description>I like the resulting syntax.

What about nested dont?
dont {
  dont {
      println(&quot;Hello? Can anyone hear me?&quot;);
  }
}

In math minus and minus gives plus. :)</description>
		<content:encoded><![CDATA[<p>I like the resulting syntax.</p>
<p>What about nested dont?<br />
dont {<br />
  dont {<br />
      println(&#8220;Hello? Can anyone hear me?&#8221;);<br />
  }<br />
}</p>
<p>In math minus and minus gives plus. :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
