Re[2]: [PEAR-DEV] [PEPr] +1 for XML::XML_Feed_Parser

From: Date: Sat, 22 Oct 2005 13:51:41 +0000
Subject: Re[2]: [PEAR-DEV] [PEPr] +1 for XML::XML_Feed_Parser
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-40247@lists.php.net to get a copy of this message
||*()*|| [\..konnichi wa, ogenki desu ka, Arnaud../] Friday, October 21, 2005, 7:12:18 AM, you wrote: AL> Sean Coates wrote: >>Sorry to jump in... >> >> >> >>>JP> I would prefer using ' for all strings except those with >>>JP> backslash expressions as variable interpolation is more expensive >>>JP> and less visible than concatenation. >>> >>> >> >>Justin, are you sure? I always understood concatenation to be slower >>because memory had to be allocated separately for each string (prior to >>concatenation) whereas with interpolation, the memory is already >>allocated. Not trying to start a fight--I actually want to know your >>interpretation/proof. >> >> >> AL> I remember seeing a comment from Ilia on a blog post about that. Ilia AL> did several tests and the number of opcodes is smaller when doing AL> concatenation. AL> I don't remember where and cannot find it on google doing a quick search. AL> Alan pointed out the other day that auditing code which uses ' is easier AL> because you know no variable substitution is going to occur so it is AL> easier to read. Once you've got a syntax highlightning engine such as net.sf.colorer, for example, reading "strings $like being $this or $that" is easier and faster than 'strings '.$like.'being '.$this.'or '.'$that' and there is more chances to spot a mistake like I did here on coding stage. And since it is also faster to type it makes one of PHP features, what makes coding in PHP differ from JS in a better way. Since none of you provided any links, I still do not see any grounds why to stick with single quotes. Considering PEAR is a central place for a quality code and your desire to ought everyone follow these rules, maybe it is time to prove your words and make a research? Justin? P.S. Guys, how about to relax CS a bit and make all other "coding practices" OFFTOPIC so the people calm down eventually? Where is this tracker where I could post a report about how I am bugged with those? WBR.techtonik -- (B)uilding, (A)ntenna, (S)pan and (E)arth * terminal velocity - 54m/s, 305m *

« previous php.pear.dev (#40247) next »