hash as argument

R

Richard Morse

The current leaning seems to be "Single quotes when possible, double when
needed". Preferring single quotes is reader-friendly because they are
easier to parse, but less programmer-friendly because (applied strictly)
it calls for frequent changes of quotes during maintenance. I could
also live with the opposite rule, "Double quotes unless they are positively
unwieldy", but at least among the majority of clpm regulars, reader-
friendliness appears to have won.

I think we might be seeing an effect of geography here.

At least to me, speaking as a denizen of the USA, double-quotes are the
standard quote. If you have a quote within double-quotes, then you use
single quotes, and as quotes nest, you alternate. But the top level of
quotes is the double-quote.

I also, however, read a lot of (older) British books (mystery stories,
mostly). In many of these, I see the opposite convention -- that is,
the top level quote is the single quote.

When I'm programming, I use double-quotes by default -- my left hand
reaches for the shift key without any thought. If I need to use
single-quotes, it requires active intervention on my part. When I'm
reading programs, I sometimes don't even consciously see the quotes, I
just assume double-quotes.

So at least to me, double-quotes are the more reader-friendly -- they
match the way I think...

Ricky
 
B

Brad Baxter

Daedalus ([email protected]) wrote on MMMCMLXVI September MCMXCIII in
<URL:::
:: I agree with you about conventions, where it's necessary, but seriously
:: quoting don't need convention.


Here, here! If Larry thought quoting needed a convention, he wouldn't
have given us q and qq.


Abigail

my $japh = q"Just another Perl Hacker.";
print qq'$japh\n';


Brad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top