<?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: PHP and XML manipulation</title>
	<atom:link href="http://blog.hatsuseno.org/index.php/php-and-xml-manipulation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hatsuseno.org/index.php/php-and-xml-manipulation/</link>
	<description>rantings on tech</description>
	<lastBuildDate>Sat, 13 Jun 2009 17:22:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: hatsuseno</title>
		<link>http://blog.hatsuseno.org/index.php/php-and-xml-manipulation/comment-page-1/#comment-4</link>
		<dc:creator>hatsuseno</dc:creator>
		<pubDate>Fri, 29 May 2009 00:03:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hatsuseno.org/?p=32#comment-4</guid>
		<description>Hmm, you did provide me with an idea, using PHPs Reflection API maybe I could adjust the read-only behaviour in run time, but sadly, it seems that as with SimpleXML, DOM objects are constructed with some kind of black magic that prevents explicit reverse engineering on the classes. There are no properties, static or otherwise, only the methods already described on php.net. Would have been nice though :)</description>
		<content:encoded><![CDATA[<p>Hmm, you did provide me with an idea, using PHPs Reflection API maybe I could adjust the read-only behaviour in run time, but sadly, it seems that as with SimpleXML, DOM objects are constructed with some kind of black magic that prevents explicit reverse engineering on the classes. There are no properties, static or otherwise, only the methods already described on php.net. Would have been nice though <img src='http://blog.hatsuseno.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juerd Waalboer</title>
		<link>http://blog.hatsuseno.org/index.php/php-and-xml-manipulation/comment-page-1/#comment-3</link>
		<dc:creator>Juerd Waalboer</dc:creator>
		<pubDate>Thu, 28 May 2009 21:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.hatsuseno.org/?p=32#comment-3</guid>
		<description>Immutable (read-only) data is annoying in many ways, in many libraries and frameworks. The main problem is that once you&#039;ve made something read-only, there&#039;s generally no sane way back. At least if something&#039;s mutable, then you can still choose to not-change it.

I believe that immutability, if necessary at all, should come with an option to either disable it, or to replace the object or value with a copy that can be modified.

Consider what happens when I download an ODT; it&#039;ll open in OOo Writer, which will treat it read-only. This makes sense: from a user perspective, the document is on the web server, on which I don&#039;t have write access. It would only be confusing if I could change it and save that, as I would actually be saving to a temporary file and my work would be lost soon. However, I can save the document in my home directory and then edit it and save the modified copy again. A similar behaviour would be very welcome in some APIs. 

I feel the same way about constants too, by the way. Yes, it&#039;s nice if you can indicate that you intended the value to stay the same forever, but more than once I&#039;ve used Perl&#039;s immense flexibility to override this decision, to bolt on extra functionality that the original author probably never thought of when in their infinite wisdom they decided that the value be constant. In other programming languages, or with complexer object oriented frameworks, one may not be so lucky and may not be able to say &quot;(I think) I know what I&#039;m doing, so get out of my way.&quot;</description>
		<content:encoded><![CDATA[<p>Immutable (read-only) data is annoying in many ways, in many libraries and frameworks. The main problem is that once you&#8217;ve made something read-only, there&#8217;s generally no sane way back. At least if something&#8217;s mutable, then you can still choose to not-change it.</p>
<p>I believe that immutability, if necessary at all, should come with an option to either disable it, or to replace the object or value with a copy that can be modified.</p>
<p>Consider what happens when I download an ODT; it&#8217;ll open in OOo Writer, which will treat it read-only. This makes sense: from a user perspective, the document is on the web server, on which I don&#8217;t have write access. It would only be confusing if I could change it and save that, as I would actually be saving to a temporary file and my work would be lost soon. However, I can save the document in my home directory and then edit it and save the modified copy again. A similar behaviour would be very welcome in some APIs. </p>
<p>I feel the same way about constants too, by the way. Yes, it&#8217;s nice if you can indicate that you intended the value to stay the same forever, but more than once I&#8217;ve used Perl&#8217;s immense flexibility to override this decision, to bolt on extra functionality that the original author probably never thought of when in their infinite wisdom they decided that the value be constant. In other programming languages, or with complexer object oriented frameworks, one may not be so lucky and may not be able to say &#8220;(I think) I know what I&#8217;m doing, so get out of my way.&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

