<?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: Writing things right</title>
	<atom:link href="http://www.drmaciver.com/2009/01/writing-things-right/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.drmaciver.com/2009/01/writing-things-right/</link>
	<description></description>
	<lastBuildDate>Sun, 14 Mar 2010 00:09:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Pete</title>
		<link>http://www.drmaciver.com/2009/01/writing-things-right/comment-page-1/#comment-769</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Fri, 10 Apr 2009 13:08:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.drmaciver.com/?p=256#comment-769</guid>
		<description>This would have been better with a look at objective c, which allows you to interleave a method&#039;s name with its arguments.  For example, if you have a &quot;NSMutableArray *myArray&quot;, you can do this:

[myArray insertObject:myObj atIndex:myIndex]

...where the message &quot;insertObj:atIndex:&quot; is sent with &quot;myObj&quot; and &quot;myIndex&quot; as its arguments to myArray.</description>
		<content:encoded><![CDATA[<p>This would have been better with a look at objective c, which allows you to interleave a method&#8217;s name with its arguments.  For example, if you have a &#8220;NSMutableArray *myArray&#8221;, you can do this:</p>
<p>[myArray insertObject:myObj atIndex:myIndex]</p>
<p>&#8230;where the message &#8220;insertObj:atIndex:&#8221; is sent with &#8220;myObj&#8221; and &#8220;myIndex&#8221; as its arguments to myArray.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reinier Zwitserloot</title>
		<link>http://www.drmaciver.com/2009/01/writing-things-right/comment-page-1/#comment-767</link>
		<dc:creator>Reinier Zwitserloot</dc:creator>
		<pubDate>Thu, 09 Apr 2009 23:14:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.drmaciver.com/?p=256#comment-767</guid>
		<description>A language I&#039;ve always wanted to see is one where the type, its canonical representation (in most circumstances, the fields of an object in memory), and the operations available to any given singular unit of code, are all separate. Currently all OO languages I know of effectively let object representation and operations available be the same for all involved units of code that make up a program.

I want to be able to say: Okay, Strings are this class, and this object is an instance of String, but whenever *THIS* bit of code is dealing with strings, I want you to offer the string through this filter. The filter is free to do just about anything. It could, for example, add an rtrim() method. It could also offer deprecated functionality that the canonical (newer) version no longer has.  There are quite a few things you can do with such a feature:

 - put however much lipstick on whatever pig you have to work with until you find it palatable (such as adding rtrim as a method, but only for your code unit e.g. package, module, source file, whatever is suitable).

 - aggressively update APIs without any concern for backwards compatibility - then write a filter that is automatically offered to all other bits of code that declare that they were expecting v(old). You now not only have 2 separate code bases that represent the same thing (String v1 and String v2), but strings from one version are 100% interchangible and compatible with the other. They&#039;re really the same object, each code base simply sees a different set of operations on them.

 - aggressively modularize and personalize the entire language. If *I* am a folding fanatic and I want /: to mean fold left, that&#039;s fine, and I can adopt this in my view. But, if you take this notion to the extreme, a tool can analyse my call to /: on an iterable, and figure out that the &#039;foldLeft&#039; call in a different view of the same type means the same thing, and translate. If I pass this code off to another developer who has set up his programming environment to translate things to his particular view if at all possible, he will see .foldLeft, and if he saves this and sends it back to me, I will see /: again. In actual fact, the canonical method is located somewhere outside of the Iterable type altogether (lets say in an IterablesUtils class, or some such - analogous to your C# StringUtils) - but nobody involved here even needs to know this. Even better: If that other guy finds the code unbearably long-winded and complicated, he can look through a specific &#039;view&#039; definition I&#039;ve set up that makes this code much clearer to me (think DSL), and selectively start enabling each transformation described in it as he groks them, which instantly translates all the code of that project to incorporate these transformations. He can also elect to start off with my view, and anytime he sees gibberish he doesn&#039;t understand, just mouse-over or do some other quick HID operation to temporarily see how the given code snippet would have looked like if I programmed it according to my view definitions.</description>
		<content:encoded><![CDATA[<p>A language I&#8217;ve always wanted to see is one where the type, its canonical representation (in most circumstances, the fields of an object in memory), and the operations available to any given singular unit of code, are all separate. Currently all OO languages I know of effectively let object representation and operations available be the same for all involved units of code that make up a program.</p>
<p>I want to be able to say: Okay, Strings are this class, and this object is an instance of String, but whenever *THIS* bit of code is dealing with strings, I want you to offer the string through this filter. The filter is free to do just about anything. It could, for example, add an rtrim() method. It could also offer deprecated functionality that the canonical (newer) version no longer has.  There are quite a few things you can do with such a feature:</p>
<p> &#8211; put however much lipstick on whatever pig you have to work with until you find it palatable (such as adding rtrim as a method, but only for your code unit e.g. package, module, source file, whatever is suitable).</p>
<p> &#8211; aggressively update APIs without any concern for backwards compatibility &#8211; then write a filter that is automatically offered to all other bits of code that declare that they were expecting v(old). You now not only have 2 separate code bases that represent the same thing (String v1 and String v2), but strings from one version are 100% interchangible and compatible with the other. They&#8217;re really the same object, each code base simply sees a different set of operations on them.</p>
<p> &#8211; aggressively modularize and personalize the entire language. If *I* am a folding fanatic and I want /: to mean fold left, that&#8217;s fine, and I can adopt this in my view. But, if you take this notion to the extreme, a tool can analyse my call to /: on an iterable, and figure out that the &#8216;foldLeft&#8217; call in a different view of the same type means the same thing, and translate. If I pass this code off to another developer who has set up his programming environment to translate things to his particular view if at all possible, he will see .foldLeft, and if he saves this and sends it back to me, I will see /: again. In actual fact, the canonical method is located somewhere outside of the Iterable type altogether (lets say in an IterablesUtils class, or some such &#8211; analogous to your C# StringUtils) &#8211; but nobody involved here even needs to know this. Even better: If that other guy finds the code unbearably long-winded and complicated, he can look through a specific &#8216;view&#8217; definition I&#8217;ve set up that makes this code much clearer to me (think DSL), and selectively start enabling each transformation described in it as he groks them, which instantly translates all the code of that project to incorporate these transformations. He can also elect to start off with my view, and anytime he sees gibberish he doesn&#8217;t understand, just mouse-over or do some other quick HID operation to temporarily see how the given code snippet would have looked like if I programmed it according to my view definitions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://www.drmaciver.com/2009/01/writing-things-right/comment-page-1/#comment-766</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Thu, 09 Apr 2009 22:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.drmaciver.com/?p=256#comment-766</guid>
		<description>Actually ruby already has .rtrim method built in.

Anyway, I think one point is that this fine article lost a bit track.

You started with &quot;OO has contributed many big and important innovations to programming.&quot;
but then changed to Haskell quickly... which left me confused. What has Haskell to do with OO? 

Haskell itself is evil already, I dont know why syntax changes make Haskell code anymore evil - it is as close as Satan codes. 

God may use Lisp, ancient as he may be if he would exist - but Satan uses Haskell.

It is as evil as programming can be.</description>
		<content:encoded><![CDATA[<p>Actually ruby already has .rtrim method built in.</p>
<p>Anyway, I think one point is that this fine article lost a bit track.</p>
<p>You started with &#8220;OO has contributed many big and important innovations to programming.&#8221;<br />
but then changed to Haskell quickly&#8230; which left me confused. What has Haskell to do with OO? </p>
<p>Haskell itself is evil already, I dont know why syntax changes make Haskell code anymore evil &#8211; it is as close as Satan codes. </p>
<p>God may use Lisp, ancient as he may be if he would exist &#8211; but Satan uses Haskell.</p>
<p>It is as evil as programming can be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.drmaciver.com/2009/01/writing-things-right/comment-page-1/#comment-765</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Thu, 09 Apr 2009 21:29:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.drmaciver.com/?p=256#comment-765</guid>
		<description></description>
		<content:encoded><![CDATA[]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew B.</title>
		<link>http://www.drmaciver.com/2009/01/writing-things-right/comment-page-1/#comment-763</link>
		<dc:creator>Andrew B.</dc:creator>
		<pubDate>Thu, 09 Apr 2009 20:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.drmaciver.com/?p=256#comment-763</guid>
		<description>david, regarding subclassing, see Django&#039;s SafeString class. It would be pretty simple to extend the technique it uses to automatically wrap the results of all method calls on subclass instances.</description>
		<content:encoded><![CDATA[<p>david, regarding subclassing, see Django&#8217;s SafeString class. It would be pretty simple to extend the technique it uses to automatically wrap the results of all method calls on subclass instances.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
