<?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: Pharo Superpower: Respond to any Message</title>
	<atom:link href="http://www.iam.unibe.ch/~akuhn/blog/2010/pharo-superpower-respond-to-any-message/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iam.unibe.ch/~akuhn/blog/2010/pharo-superpower-respond-to-any-message/</link>
	<description>Random notes on software, programming and languages.</description>
	<pubDate>Thu, 24 May 2012 10:45:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Henry</title>
		<link>http://www.iam.unibe.ch/~akuhn/blog/2010/pharo-superpower-respond-to-any-message/comment-page-1/#comment-3434</link>
		<dc:creator>Henry</dc:creator>
		<pubDate>Sat, 06 Feb 2010 23:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.iam.unibe.ch/~akuhn/blog/?p=597#comment-3434</guid>
		<description>One place I've used it, is the BGOK package in VisualWorks, used for displaying charts.
The datasets for the graphs there are supposed to be accessed statically with accessors, but when you don't know in from which datasets you will be displaying, telling it to access a model object which implements DNU, you can achieve just that.

Basically, if you use any external package which expects the model you provide it to follow a predefined structure, yet you need it to be dynamic, but don't want to modify the code of the external package, DNU is your friend.
(As an alternative to light-weight classes and adding accessor methods on the go).

My #1 rule of thumb when it comes to using this superpower is: If you implement doesNotUnderstand: without calling super, you're doing it wrong.</description>
		<content:encoded><![CDATA[<p>One place I&#8217;ve used it, is the BGOK package in VisualWorks, used for displaying charts.<br />
The datasets for the graphs there are supposed to be accessed statically with accessors, but when you don&#8217;t know in from which datasets you will be displaying, telling it to access a model object which implements DNU, you can achieve just that.</p>
<p>Basically, if you use any external package which expects the model you provide it to follow a predefined structure, yet you need it to be dynamic, but don&#8217;t want to modify the code of the external package, DNU is your friend.<br />
(As an alternative to light-weight classes and adding accessor methods on the go).</p>
<p>My #1 rule of thumb when it comes to using this superpower is: If you implement doesNotUnderstand: without calling super, you&#8217;re doing it wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akuhn</title>
		<link>http://www.iam.unibe.ch/~akuhn/blog/2010/pharo-superpower-respond-to-any-message/comment-page-1/#comment-3368</link>
		<dc:creator>akuhn</dc:creator>
		<pubDate>Wed, 20 Jan 2010 00:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.iam.unibe.ch/~akuhn/blog/?p=597#comment-3368</guid>
		<description>Teachable is nice! impressive how little code is required to build a basic mock object. Guess I should include something similar in my SUnit fork, would make a nice light-weight alternative to anonymous classes.</description>
		<content:encoded><![CDATA[<p>Teachable is nice! impressive how little code is required to build a basic mock object. Guess I should include something similar in my SUnit fork, would make a nice light-weight alternative to anonymous classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torsten Bergmann</title>
		<link>http://www.iam.unibe.ch/~akuhn/blog/2010/pharo-superpower-respond-to-any-message/comment-page-1/#comment-3365</link>
		<dc:creator>Torsten Bergmann</dc:creator>
		<pubDate>Tue, 19 Jan 2010 14:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.iam.unibe.ch/~akuhn/blog/?p=597#comment-3365</guid>
		<description>Take care with the DNU trick - it may be hard for others to debug if you use it  in your own projects. However with the flexibility of Smalltalk you are even able to create objects and teach them step by step how to behave.

Have a look at 
http://astares.blogspot.com/2005/04/teaching-behavior.html

and the code/examples in the "Teachable" project on Squeaksource</description>
		<content:encoded><![CDATA[<p>Take care with the DNU trick - it may be hard for others to debug if you use it  in your own projects. However with the flexibility of Smalltalk you are even able to create objects and teach them step by step how to behave.</p>
<p>Have a look at<br />
<a href="http://astares.blogspot.com/2005/04/teaching-behavior.html" rel="nofollow">http://astares.blogspot.com/2005/04/teaching-behavior.html</a></p>
<p>and the code/examples in the &#8220;Teachable&#8221; project on Squeaksource</p>
]]></content:encoded>
	</item>
</channel>
</rss>

