Re: [PEPr] +1 for XML::XML_Feed_Parser
| From: | Justin Patrin | Date: | Sat, 22 Oct 2005 22:33:30 +0000 |
| Subject: | Re: [PEPr] +1 for XML::XML_Feed_Parser | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40254@lists.php.net to get a copy of this message | ||
On 10/22/05, Arnaud Limbourg <arnaud@limbourg.com> wrote:
> anatoly techtonik wrote:
>
> >||*()*|| [\..konnichi wa, ogenki desu ka, Arnaud../]
> >
> >
> >
> >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?
> >
> >
> >
>
> http://www.procata.com/blog/archives/2005/03/08/microbenchmarks-of-single-and-double-qouting/
This link is useless in this context. This person shows that literals
are basically the same. This is known. Then they *mention* that they
could try the other possibilities but they don't.
As I said before, I *have* tried the other possibilities (I used both
normal execution and eval() to test different possibilities) and
"string $var" was consistently quite a bit slower than 'string '.$var.
Others have mentioned that the same is true. But since you won't
believe our experience I've written a whole new script which uses
'time' to time the runs:
http://pear.reversefold.com/strings/index.php
>
> >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
> >
> >
> As far as I can see Coding Standards do not say you should use
> concatenation over inlining, end of the story. Some arguments were given
> in favor of the former, in the end the developer decides which form to use.
>
And may I point out that I *always* say that I *prefer* single quotes,
not they the developer *must* use them.
--
Justin Patrin