<?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: .NET Style Properties (Getters/Setters) in PHP</title>
	<atom:link href="http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/</link>
	<description>Better People, Better Code, Going the Extra Mile</description>
	<lastBuildDate>Thu, 08 Sep 2011 11:06:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jeff Miles</title>
		<link>http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/comment-page-1/#comment-157</link>
		<dc:creator>Jeff Miles</dc:creator>
		<pubDate>Fri, 02 Apr 2010 05:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/#comment-157</guid>
		<description>Gal,

Thanks for the input, this is good information to chew on.  Like you said, I am an OOP freak as well so this is a huge deal (even though it probably shouldn&#039;t be) to me...Thanks for the comment!

Jeff</description>
		<content:encoded><![CDATA[<p>Gal,</p>
<p>Thanks for the input, this is good information to chew on.  Like you said, I am an OOP freak as well so this is a huge deal (even though it probably shouldn&#8217;t be) to me&#8230;Thanks for the comment!</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gal</title>
		<link>http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/comment-page-1/#comment-156</link>
		<dc:creator>Gal</dc:creator>
		<pubDate>Sun, 28 Mar 2010 14:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/#comment-156</guid>
		<description>i like the use of getters/setters, and i would rather having them as separate functions. One reason would be that in the setter i would sometime check for validity, ie is_numeric(), and return true/false.

One thing to take in mind, when it comes to interpreted languages (this doesn&#039;t apply to compiled languages), i would advise not using getters/setters for these kind of things, since it is much slower. I know this damages the object oriented approach, and i&#039;m also an oop freak, but when you write large systems performance should be considered in every line of code.
Calling a function would take about twice longer, since active context/scopes have to change etc.
If the methods are not used in a loop or something then the it shouldn&#039;t bother you too much though. other than that, both techniques are fine.</description>
		<content:encoded><![CDATA[<p>i like the use of getters/setters, and i would rather having them as separate functions. One reason would be that in the setter i would sometime check for validity, ie is_numeric(), and return true/false.</p>
<p>One thing to take in mind, when it comes to interpreted languages (this doesn&#8217;t apply to compiled languages), i would advise not using getters/setters for these kind of things, since it is much slower. I know this damages the object oriented approach, and i&#8217;m also an oop freak, but when you write large systems performance should be considered in every line of code.<br />
Calling a function would take about twice longer, since active context/scopes have to change etc.<br />
If the methods are not used in a loop or something then the it shouldn&#8217;t bother you too much though. other than that, both techniques are fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Miles</title>
		<link>http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/comment-page-1/#comment-151</link>
		<dc:creator>Jeff Miles</dc:creator>
		<pubDate>Tue, 23 Feb 2010 02:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/#comment-151</guid>
		<description>Dan,

It totally makes sense, I do think though that there is some CLR runtime impact while the CLR determines whether it is a get or a set function but maybe not.

I think what your question boils down to is this: Do you sacrifice developer speed &amp; comfort for execution speed?

I don&#039;t know the performance impact of what I am proposing above, but you do have a good point.  I will have to look into the performance impacts of what I am doing.  Does me saving time coding justify the performance impact...interesting...</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>It totally makes sense, I do think though that there is some CLR runtime impact while the CLR determines whether it is a get or a set function but maybe not.</p>
<p>I think what your question boils down to is this: Do you sacrifice developer speed &#038; comfort for execution speed?</p>
<p>I don&#8217;t know the performance impact of what I am proposing above, but you do have a good point.  I will have to look into the performance impacts of what I am doing.  Does me saving time coding justify the performance impact&#8230;interesting&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daniel</title>
		<link>http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/comment-page-1/#comment-150</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Tue, 23 Feb 2010 01:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.twomilessolutions.com/2010/02/22/net-style-properties-getterssetters-in-php/#comment-150</guid>
		<description>Well, I&#039;m not really a coder any more but at the risk of sounding dumb and really only because I think it would be fun to get into the fray....

Two thoughts: 1) I like stuff that does one thing only &amp; does it very well.  The Get/Set to me is the ultimate of this...no logic, just a straight do it....and only it.  2) I want to set the value to zero...two lines get evaluated to do this...not one...true? 3) At least in .Net VS2005 code coverage metrics around automated test scripts tend to suck when it comes to If/Then/Else constructs.  Does this matter? Probably not, but again it points out that it&#039;s potentially a less explicit way to do the work.  

OK, did I just magnify my ignorance or did any of this actually make sense?</description>
		<content:encoded><![CDATA[<p>Well, I&#8217;m not really a coder any more but at the risk of sounding dumb and really only because I think it would be fun to get into the fray&#8230;.</p>
<p>Two thoughts: 1) I like stuff that does one thing only &amp; does it very well.  The Get/Set to me is the ultimate of this&#8230;no logic, just a straight do it&#8230;.and only it.  2) I want to set the value to zero&#8230;two lines get evaluated to do this&#8230;not one&#8230;true? 3) At least in .Net VS2005 code coverage metrics around automated test scripts tend to suck when it comes to If/Then/Else constructs.  Does this matter? Probably not, but again it points out that it&#8217;s potentially a less explicit way to do the work.  </p>
<p>OK, did I just magnify my ignorance or did any of this actually make sense?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

