NYCPHP Meetup

NYPHP.org

[nycphp-talk] single quote vs. double quote

Michael Southwell michael.southwell at nyphp.com
Wed Apr 11 09:38:06 EDT 2007


At 06:37 AM 4/11/2007, you wrote:
I further think that there is a balance between code performance and 
readability. I've seen code where the programmer drops out of PHP for 
even a single word instead of concatenating that into the echoed 
string.  That is plain silly and I doubt that this turns into a 
performance improvement at all compared to doing that for the before 
mentioned 100 lines of static text. But even for that there is maybe 
an explanation.

There may well be.  One issue that I have not seen discussed in this 
connection is that of coding automaticity.  If you *always* write 
things in the same way, doing so becomes eventually automatic and 
nearly unconscious. This situation minimizes errors and maximizes 
speed, which is always a good combination goal. A good text editor 
can make such jumping back and forth (or any such oft-repeated 
action) extremely simple. In this case, then, what is optimized is 
not execution speed/efficiency but rather coder speed/efficiency, 
which is always (or at least almost always) more important.


Michael Southwell, Vice President for Education
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses





More information about the talk mailing list