<?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: A couple of notes about Groovy syntax</title>
	<atom:link href="http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax</link>
	<description>A search for meaning in software and life</description>
	<lastBuildDate>Tue, 31 Aug 2010 09:23:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Blog bookmarks 01/14/2010 &#171; My Diigo bookmarks</title>
		<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/comment-page-1#comment-845</link>
		<dc:creator>Blog bookmarks 01/14/2010 &#171; My Diigo bookmarks</dc:creator>
		<pubDate>Thu, 14 Jan 2010 07:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.cacoethes.co.uk/blog/?p=183#comment-845</guid>
		<description>[...] A couple of notes about Groovy syntax @ Peter Ledbrook [...]</description>
		<content:encoded><![CDATA[<p>[...] A couple of notes about Groovy syntax @ Peter Ledbrook [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Broadfoot</title>
		<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/comment-page-1#comment-844</link>
		<dc:creator>Chris Broadfoot</dc:creator>
		<pubDate>Thu, 14 Jan 2010 01:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.cacoethes.co.uk/blog/?p=183#comment-844</guid>
		<description>&gt; Besides, even pure Java developers don’t call toString, they use “”+, e.g.,

actually it is still safe to do

Object foo = null;
System.out.println(foo);

in Java. it will print &quot;null&quot;</description>
		<content:encoded><![CDATA[<p>&gt; Besides, even pure Java developers don’t call toString, they use “”+, e.g.,</p>
<p>actually it is still safe to do</p>
<p>Object foo = null;<br />
System.out.println(foo);</p>
<p>in Java. it will print &#8220;null&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention A couple of notes about Groovy syntax @ Peter Ledbrook -- Topsy.com</title>
		<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/comment-page-1#comment-843</link>
		<dc:creator>Tweets that mention A couple of notes about Groovy syntax @ Peter Ledbrook -- Topsy.com</dc:creator>
		<pubDate>Thu, 14 Jan 2010 00:16:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.cacoethes.co.uk/blog/?p=183#comment-843</guid>
		<description>[...] This post was mentioned on Twitter by Guillaume Laforge, Grails en Mexico, Loic Descotte, groovyblogs.org, dev.groovyblogs.org and others. dev.groovyblogs.org said: A couple of notes about Groovy syntax -- http://bit.ly/7X9smp -- Peter Ledbrook [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Guillaume Laforge, Grails en Mexico, Loic Descotte, groovyblogs.org, dev.groovyblogs.org and others. dev.groovyblogs.org said: A couple of notes about Groovy syntax &#8212; <a href="http://bit.ly/7X9smp" rel="nofollow">http://bit.ly/7X9smp</a> &#8212; Peter Ledbrook [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/comment-page-1#comment-842</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Wed, 13 Jan 2010 18:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.cacoethes.co.uk/blog/?p=183#comment-842</guid>
		<description>But &lt;code&gt;println name&lt;/code&gt; is even more concise. It works regardless of whether &lt;tt&gt;name&lt;/tt&gt; is a string or not.</description>
		<content:encoded><![CDATA[<p>But <code>println name</code> is even more concise. It works regardless of whether <tt>name</tt> is a string or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: noah</title>
		<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/comment-page-1#comment-841</link>
		<dc:creator>noah</dc:creator>
		<pubDate>Wed, 13 Jan 2010 18:15:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.cacoethes.co.uk/blog/?p=183#comment-841</guid>
		<description>I disagree. 

    println &quot;${name}&quot;

is significantly shorter and easier to read than

    println name.toString()

unless you know for certain that name is a String (then you can drop the toString()). Besides, even pure Java developers don&#039;t call toString, they use &quot;&quot;+, e.g.,

    println &quot;&quot;+name

because it&#039;s null safe.</description>
		<content:encoded><![CDATA[<p>I disagree. </p>
<p>    println &#8220;${name}&#8221;</p>
<p>is significantly shorter and easier to read than</p>
<p>    println name.toString()</p>
<p>unless you know for certain that name is a String (then you can drop the toString()). Besides, even pure Java developers don&#8217;t call toString, they use &#8220;&#8221;+, e.g.,</p>
<p>    println &#8220;&#8221;+name</p>
<p>because it&#8217;s null safe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe McTee</title>
		<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/comment-page-1#comment-840</link>
		<dc:creator>Joe McTee</dc:creator>
		<pubDate>Wed, 13 Jan 2010 17:07:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.cacoethes.co.uk/blog/?p=183#comment-840</guid>
		<description>Hi Peter,

Really appreciate posts like this. It is important to not just communicate what the language does, but how it should be used. Idiomatic issues are often ignored.

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>Really appreciate posts like this. It is important to not just communicate what the language does, but how it should be used. Idiomatic issues are often ignored.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/comment-page-1#comment-839</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Wed, 13 Jan 2010 12:55:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cacoethes.co.uk/blog/?p=183#comment-839</guid>
		<description>That&#039;s actually something different. You can do that from a script, in which case the variable is added to the script binding, but not in a normal class method. Try this in the Groovy console:
&lt;pre&gt;
class MyTest {
    def testMethod() {
        y = 3
        println y
    }    
}

t = new MyTest()
t.testMethod()
&lt;/pre&gt;
The variable &lt;tt&gt;t&lt;/tt&gt; is created without problem, but you&#039;ll get an exception from the line &lt;code&gt;y = 3&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>That&#8217;s actually something different. You can do that from a script, in which case the variable is added to the script binding, but not in a normal class method. Try this in the Groovy console:</p>
<pre>
class MyTest {
    def testMethod() {
        y = 3
        println y
    }
}

t = new MyTest()
t.testMethod()
</pre>
<p>The variable <tt>t</tt> is created without problem, but you&#8217;ll get an exception from the line <code>y = 3</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Wiedenbrueck</title>
		<link>http://www.cacoethes.co.uk/blog/groovyandgrails/a-couple-of-notes-about-groovy-syntax/comment-page-1#comment-838</link>
		<dc:creator>Nick Wiedenbrueck</dc:creator>
		<pubDate>Wed, 13 Jan 2010 12:48:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.cacoethes.co.uk/blog/?p=183#comment-838</guid>
		<description>I can also omit the def in a variable declaration, when I initialize it like this

y = 3

I&#039;ve never seen any reasoning for this.</description>
		<content:encoded><![CDATA[<p>I can also omit the def in a variable declaration, when I initialize it like this</p>
<p>y = 3</p>
<p>I&#8217;ve never seen any reasoning for this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
