From: Rich Morin Date: 2006-09-26T04:09:54+09:00 Subject: Re: "" vs '' At 3:10 AM +0900 9/26/06, James Edward Gray II wrote: > On Sep 25, 2006, at 12:03 PM, Rich Morin wrote: > >> Use '' by default: >> >> - It's less work for the interpreter. > > What makes you say this? If the interpreter sees a single-quoted string, it knows that it doesn't need to scan the string for things (such as escape sequences) to expand. I agree that this effect will be lost in the noise, in most cases, but why make the interpreter do extra work? The real point, in any case, is one of making things clear to the reader. If a quoted string uses double quotes, the reader has to look it over to determine whether any magic is being performed. This wastes some of the reader's time (and no, I don't have a benchmark for this. :-). -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development