<?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: DSL tactics in Groovy (1/many)</title>
	<atom:link href="http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/feed/" rel="self" type="application/rss+xml" />
	<link>http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/</link>
	<description>Computational Biology, Epidemiology, Infectious diseases, Open Science</description>
	<lastBuildDate>Mon, 02 Nov 2009 14:07:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ciro Cavani</title>
		<link>http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/comment-page-1/#comment-4180</link>
		<dc:creator>Ciro Cavani</dc:creator>
		<pubDate>Fri, 29 Feb 2008 04:19:44 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/#comment-4180</guid>
		<description>Hi,

I am using Groovy a few weeks now and really like all sugar sintax.

For example, you can use the &quot;as&quot; operator for creating instances:

cq = [name: &quot;Chloroquine&quot;, abbreviation: &quot;cq&quot;, halfLife: 83.h] as Compound

is the same of setting properties one by one (lists work for constructors on &quot;as&quot; operator).

and access values on map with &quot;dot&quot; operator:

Compound c = new Compound(args.name)
c.abbreviation = args.abbreviation ?: null
c.halfLife = args.halfLife ?: null

and go on...

Thanks,

P.S. Groovy reminds me 10 years ago when I learned C++98 knowing C... now Java seems like C, so old! ;)</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am using Groovy a few weeks now and really like all sugar sintax.</p>
<p>For example, you can use the &#8220;as&#8221; operator for creating instances:</p>
<p>cq = [name: "Chloroquine", abbreviation: "cq", halfLife: 83.h] as Compound</p>
<p>is the same of setting properties one by one (lists work for constructors on &#8220;as&#8221; operator).</p>
<p>and access values on map with &#8220;dot&#8221; operator:</p>
<p>Compound c = new Compound(args.name)<br />
c.abbreviation = args.abbreviation ?: null<br />
c.halfLife = args.halfLife ?: null</p>
<p>and go on&#8230;</p>
<p>Thanks,</p>
<p>P.S. Groovy reminds me 10 years ago when I learned C++98 knowing C&#8230; now Java seems like C, so old! <img src='http://tiago.org/ps/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dierk König</title>
		<link>http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/comment-page-1/#comment-4084</link>
		<dc:creator>Dierk König</dc:creator>
		<pubDate>Mon, 25 Feb 2008 14:27:39 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/ps/2008/02/25/dsl-tactics-in-groovy-1many/#comment-4084</guid>
		<description>&gt; On the clumsy side, you will probably will have to do the same thing for the BigDecimal meta class if you want to support floats. Numbers off all kinds don’t have a common ancestor

They have: java.lang.Number.
You can use this type for your EMC but you need to call 
ExpandoMetaClass.enableGlobally()
beforehand such that inheritance lookup kicks in for the EMC.

keep groovin&#039;</description>
		<content:encoded><![CDATA[<p>&gt; On the clumsy side, you will probably will have to do the same thing for the BigDecimal meta class if you want to support floats. Numbers off all kinds don’t have a common ancestor</p>
<p>They have: java.lang.Number.<br />
You can use this type for your EMC but you need to call<br />
ExpandoMetaClass.enableGlobally()<br />
beforehand such that inheritance lookup kicks in for the EMC.</p>
<p>keep groovin&#8217;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
