On 12/21/07 5:54 AM, Larry Wall wrote:
> To you and me, the fact that there are single quotes means there's
> something there to hide.  But other people think the other way and
> see double quotes as indicating there's something to interpolate.
> I think PBP comes down on that side, but to me, single quotes are a
> little harder to see.  And maybe there's some bias from seeing double
> quotes used non-interpolatively in American English.

FWIW, my reasoning in this area is based on Laziness: single quotes mean I
don't have to scan the string looking for interpolated stuff when reading
code.  Double quotes mean I do, and I'm annoyed at the waste of time when I
scan and find nothing.  "Why didn't this guy just use singles here?"  It's
(mildly) misleading.

(There are obviously edge cases, even in Perl 5, but even naive adherence to
this guideline is a good first approximation, with a second look only
required in the rarest of cases.)

-John



Reply via email to