<?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: Scala Goodness: RichString</title>
	<atom:link href="http://codemonkeyism.com/scala-goodness-richstring/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkeyism.com/scala-goodness-richstring/</link>
	<description></description>
	<lastBuildDate>Wed, 09 May 2012 22:39:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-268789</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Mon, 01 Feb 2010 16:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-268789</guid>
		<description>I still don&#039;t get it :-)</description>
		<content:encoded><![CDATA[<p>I still don&#8217;t get it :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-268775</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 01 Feb 2010 15:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-268775</guid>
		<description>Thanks Erik. So the only overhead is a leading &quot;&quot; and a trailing &quot;.text&quot;. I can live with that.


scala&gt; val n = &quot;stephan&quot;
n: java.lang.String = stephan

scala&gt; val s = hello {n}.text
s: String = hello stephan

scala&gt; println(s)
hello stephan</description>
		<content:encoded><![CDATA[<p>Thanks Erik. So the only overhead is a leading &#8220;&#8221; and a trailing &#8220;.text&#8221;. I can live with that.</p>
<p>scala&gt; val n = &#8220;stephan&#8221;<br />
n: java.lang.String = stephan</p>
<p>scala&gt; val s = hello {n}.text<br />
s: String = hello stephan</p>
<p>scala&gt; println(s)<br />
hello stephan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266576</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 21 Jan 2010 13:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266576</guid>
		<description>@Erik: Could you paste to pastebin or something? Would really learn this, I&#039;m to stupid to follow you :-)</description>
		<content:encoded><![CDATA[<p>@Erik: Could you paste to pastebin or something? Would really learn this, I&#8217;m to stupid to follow you :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyro</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266393</link>
		<dc:creator>Tyro</dc:creator>
		<pubDate>Wed, 20 Jan 2010 18:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266393</guid>
		<description>Erik - that  trick is kind of neat.  Right now it feels too &quot;clever&quot; but I&#039;ll try it out on a couple friends and see what they think.  If it flies, it comes close to giving me a real GString which would be wonderful.</description>
		<content:encoded><![CDATA[<p>Erik &#8211; that  trick is kind of neat.  Right now it feels too &#8220;clever&#8221; but I&#8217;ll try it out on a couple friends and see what they think.  If it flies, it comes close to giving me a real GString which would be wonderful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik van Oosten</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266359</link>
		<dc:creator>Erik van Oosten</dc:creator>
		<pubDate>Wed, 20 Jan 2010 14:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266359</guid>
		<description>Stephan, no no. The &quot;&amp;lt[[CDATA&quot; is completely non-valid XML (valid XML requires a closing &quot;]]&gt;&quot;), it is just a string. I put it in there to emphasize that it is not valid XML.</description>
		<content:encoded><![CDATA[<p>Stephan, no no. The &#8220;&amp;lt[[CDATA" is completely non-valid XML (valid XML requires a closing "]]&gt;&#8221;), it is just a string. I put it in there to emphasize that it is not valid XML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266348</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 20 Jan 2010 13:22:07 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266348</guid>
		<description>Hmm. &quot;any String works&quot; =&gt; &quot;any String works which escapes everything with a CDATA command to make it XML&quot; ? 

Would be like GStrings if this would work:

scala&gt; val n = &quot;stephan&quot;
n: java.lang.String = stephan

scala&gt; val s = &quot;hello {n}&quot;
s: java.lang.String = hello {n}

(But nice to know the CDATA trick, although it is ugly it might come in handy sometimes)</description>
		<content:encoded><![CDATA[<p>Hmm. &#8220;any String works&#8221; => &#8220;any String works which escapes everything with a CDATA command to make it XML&#8221; ? </p>
<p>Would be like GStrings if this would work:</p>
<p>scala> val n = &#8220;stephan&#8221;<br />
n: java.lang.String = stephan</p>
<p>scala> val s = &#8220;hello {n}&#8221;<br />
s: java.lang.String = hello {n}</p>
<p>(But nice to know the CDATA trick, although it is ugly it might come in handy sometimes)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik van Oosten</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266344</link>
		<dc:creator>Erik van Oosten</dc:creator>
		<pubDate>Wed, 20 Jan 2010 12:55:36 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266344</guid>
		<description>Stephan, any string works. It does /not/ have to be valid XML:

scala&gt; val n = &quot;&lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;&quot;
n: java.lang.String = &lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;

scala&gt; &lt;s&gt;Hello { n }!&lt;/s&gt;.text
res3: String = Hello &lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;!

scala&gt;

(This is my last attempt to find out the right escaping.)</description>
		<content:encoded><![CDATA[<p>Stephan, any string works. It does /not/ have to be valid XML:</p>
<p>scala&gt; val n = &#8220;&lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;&#8221;<br />
n: java.lang.String = &lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;</p>
<p>scala&gt; &lt;s&gt;Hello { n }!&lt;/s&gt;.text<br />
res3: String = Hello &lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;!</p>
<p>scala&gt;</p>
<p>(This is my last attempt to find out the right escaping.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik van Oosten</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266342</link>
		<dc:creator>Erik van Oosten</dc:creator>
		<pubDate>Wed, 20 Jan 2010 12:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266342</guid>
		<description>Stephan, any string works. It does /not/ have to be valid XML:

scala&gt; val n = &quot;&lt;[[CDATA My name is invalid XML &amp; &lt;a&gt; &lt;s&gt;Hello { n }!&lt;/s&gt;.text
res3: String = Hello &lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;!</description>
		<content:encoded><![CDATA[<p>Stephan, any string works. It does /not/ have to be valid XML:</p>
<p>scala&gt; val n = &#8220;&lt;[[CDATA My name is invalid XML &amp; <a> &lt;s&gt;Hello { n }!&lt;/s&gt;.text<br />
res3: String = Hello &lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;!</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik van Oosten</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266341</link>
		<dc:creator>Erik van Oosten</dc:creator>
		<pubDate>Wed, 20 Jan 2010 12:50:48 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266341</guid>
		<description>Stephan, any string works. It does /not/ have to be valid XML:

scala&gt; val n = &quot;&lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;&quot;
n: java.lang.String = My name is invalid XML &amp; &lt;a&gt; &lt;s&gt;Hello { n }!&lt;s&gt;.text
res1: String = Hello &lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;!

scala&gt;</description>
		<content:encoded><![CDATA[<p>Stephan, any string works. It does /not/ have to be valid XML:</p>
<p>scala&gt; val n = &#8220;&lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;&#8221;<br />
n: java.lang.String = My name is invalid XML &amp; <a> &lt;s&gt;Hello { n }!&lt;s&gt;.text<br />
res1: String = Hello &lt;[[CDATA My name is invalid XML &amp; &lt;a &amp;!</p>
<p>scala&gt;</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266339</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 20 Jan 2010 12:41:09 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266339</guid>
		<description>@Erik: Agreed, when the content is valid XML one can use XML literals for &quot;GStrings&quot;, would be nice to have real ones though, not everything I do is HTML ;-)</description>
		<content:encoded><![CDATA[<p>@Erik: Agreed, when the content is valid XML one can use XML literals for &#8220;GStrings&#8221;, would be nice to have real ones though, not everything I do is HTML ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik van Oosten</title>
		<link>http://codemonkeyism.com/scala-goodness-richstring/comment-page-1/#comment-266338</link>
		<dc:creator>Erik van Oosten</dc:creator>
		<pubDate>Wed, 20 Jan 2010 12:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1453#comment-266338</guid>
		<description>Scala has GStrings! Well, almost. Here we go:

scala&gt; val n = &quot;name&quot;
n: java.lang.String = name

scala&gt; &lt;s&gt;Hello { n }!&lt;/s&gt;.text
res0: String = Hello name!

scala&gt;</description>
		<content:encoded><![CDATA[<p>Scala has GStrings! Well, almost. Here we go:</p>
<p>scala&gt; val n = &#8220;name&#8221;<br />
n: java.lang.String = name</p>
<p>scala&gt; &lt;s&gt;Hello { n }!&lt;/s&gt;.text<br />
res0: String = Hello name!</p>
<p>scala&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 3/16 queries in 0.018 seconds using disk
Object Caching 388/388 objects using disk

Served from: codemonkeyism.com @ 2012-05-22 21:25:42 -->
