<?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: Watched Properties in Scala</title>
	<atom:link href="http://stacyprowell.com/blog/2010/04/27/watched-properties-in-scala/feed/" rel="self" type="application/rss+xml" />
	<link>http://stacyprowell.com/blog/2010/04/27/watched-properties-in-scala/</link>
	<description>Ugh, Stacy&#039;s talking again...</description>
	<lastBuildDate>Wed, 07 Dec 2011 19:50:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: ittay</title>
		<link>http://stacyprowell.com/blog/2010/04/27/watched-properties-in-scala/comment-page-1/#comment-144</link>
		<dc:creator>ittay</dc:creator>
		<pubDate>Sun, 18 Jul 2010 17:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=471#comment-144</guid>
		<description>Did you consider scala.collection.mutable.Publisher?</description>
		<content:encoded><![CDATA[<p>Did you consider scala.collection.mutable.Publisher?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Hicks</title>
		<link>http://stacyprowell.com/blog/2010/04/27/watched-properties-in-scala/comment-page-1/#comment-140</link>
		<dc:creator>Matt Hicks</dc:creator>
		<pubDate>Thu, 10 Jun 2010 18:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=471#comment-140</guid>
		<description>You should look at the properties framework that Sgine provides: http://www.sgine.org as it has listenable properties and dozens of other mixable traits to enhance your properties.</description>
		<content:encoded><![CDATA[<p>You should look at the properties framework that Sgine provides: <a href="http://www.sgine.org" rel="nofollow">http://www.sgine.org</a> as it has listenable properties and dozens of other mixable traits to enhance your properties.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesper Nordenberg</title>
		<link>http://stacyprowell.com/blog/2010/04/27/watched-properties-in-scala/comment-page-1/#comment-116</link>
		<dc:creator>Jesper Nordenberg</dc:creator>
		<pubDate>Tue, 04 May 2010 19:35:02 +0000</pubDate>
		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=471#comment-116</guid>
		<description>This is one area where the language features of Scala really comes together beautifully. There are lots of new concepts and synergies to explore in relation to reactive programming/properties/STM topics: transactions, signals, inheritance, reflection etc. Scala with it&#039;s mix of functional programming, objects, powerful type system and runtime type information makes it a perfect language for this type of programming.</description>
		<content:encoded><![CDATA[<p>This is one area where the language features of Scala really comes together beautifully. There are lots of new concepts and synergies to explore in relation to reactive programming/properties/STM topics: transactions, signals, inheritance, reflection etc. Scala with it&#8217;s mix of functional programming, objects, powerful type system and runtime type information makes it a perfect language for this type of programming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Landei</title>
		<link>http://stacyprowell.com/blog/2010/04/27/watched-properties-in-scala/comment-page-1/#comment-114</link>
		<dc:creator>Landei</dc:creator>
		<pubDate>Tue, 04 May 2010 07:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=471#comment-114</guid>
		<description>&quot;Scala does not allow overriding assignment; no copy constructor for you.&quot;

You can use an &quot;update&quot; method to come at least close to assignment syntax:

class Property[T](var value:T) {
 def get:T = value
 def update(t:T) { value = t } 
}

val v = new Property(&quot;hi&quot;)

//this doesn&#039;t work
v = &quot;hello&quot;
--&gt; error: reassignment to val
--&gt;       v = &quot;hello&quot;
--&gt;          ^

//but this *does* work
v() = &quot;hello&quot;

println(v.get)
--&gt; hello</description>
		<content:encoded><![CDATA[<p>&#8220;Scala does not allow overriding assignment; no copy constructor for you.&#8221;</p>
<p>You can use an &#8220;update&#8221; method to come at least close to assignment syntax:</p>
<p>class Property[T](var value:T) {<br />
 def get:T = value<br />
 def update(t:T) { value = t }<br />
}</p>
<p>val v = new Property(&#8220;hi&#8221;)</p>
<p>//this doesn&#8217;t work<br />
v = &#8220;hello&#8221;<br />
&#8211;&gt; error: reassignment to val<br />
&#8211;&gt;       v = &#8220;hello&#8221;<br />
&#8211;&gt;          ^</p>
<p>//but this *does* work<br />
v() = &#8220;hello&#8221;</p>
<p>println(v.get)<br />
&#8211;&gt; hello</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wade</title>
		<link>http://stacyprowell.com/blog/2010/04/27/watched-properties-in-scala/comment-page-1/#comment-110</link>
		<dc:creator>Wade</dc:creator>
		<pubDate>Sun, 02 May 2010 18:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=471#comment-110</guid>
		<description>Two newbie questions:  

&quot;The responsibility for data is all back to the watcher, and off the shoulders of the watchable.&quot;  In what other language is the responsibility for data on the watchable, not the watcher?  What can I compare this to?

Is this example similar to an event-listener pattern?</description>
		<content:encoded><![CDATA[<p>Two newbie questions:  </p>
<p>&#8220;The responsibility for data is all back to the watcher, and off the shoulders of the watchable.&#8221;  In what other language is the responsibility for data on the watchable, not the watcher?  What can I compare this to?</p>
<p>Is this example similar to an event-listener pattern?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

