Tassilo v. Parseval said:
Also sprach Anno Siegel:
[ quoting conventions ]
Presumptuous or not, that's the way a new convention propagates.
Deliberately or unconsciously, some people publicly act as if it were
already in place. If enough people follow suit, it becomes so.
Clpm is one of the places where this process happens.
Just for the record, I'd like to note that this process hasn't yet
started to happen for me. On the quote issue, I decide from case to
case. Usually, when I have characters that require escaping in a
double-quotish context, I use single quotes. When I have something
to interpolate, I use double ones, even if that requires one or the
other backspace. Once the amount of backspacing gets annoying, I start
using heredocs or maybe 'qq'.
s/space/slash/
As long as you *have* reason to prefer one or another quoting mechanism,
there is no need for a convention. The convention comes in when other
criteria are absent.
I'd say that this quoting issue is too minor to require a convention on
it. I do agree that conventions and rules are invaluable. That however
wont hold true for any convention. Now, getting slightly political, when
I think about the vast amount of bills we have in Germany, I'd really
say that having fewer of those would be a relief for anyone involved.
Also, was das betrifft... uh, err, never mind.
Now, programming conventions aren't laws that bind you no matter what.
As a programmer, they help me decide what to do in an ambiguous situation,
and help me be consistent about it.
Anecdotally, as an occasional C programmer, the ambiguity of pointer-
and array notation gives me pause each time it comes up, because I don't
have a clear preference. I wish there was a convention...
As a program reader, ideally the programmer uses the same set of
conventions I do, but a different set of conventions is also useful
if consistently applied.
This group already has quite a few rules, such as using
strictures, warnings, checking the success of system-calls, lexical
scoping where applicable etc. All of those serve a very good purpose.
It's much less obvious (for me anyway) what purpose quoting-rules could
have.
Having any rule at all can be better than having none, even if the
specifics of the rule aren't provably superior to possible alternatives.
The side-of-the-road-rule exemplifies this for traffic. So I would like to
see a convention for quotes in programming.
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.
The downside of conventions is that they are grist on the mill of
pedants and wannabees. That's part of the cost of having them, I
guess. No free lunch, and all that...
Just keep in mind how certain people react towards rules they don't
agree with. I, for instance, tend to do the exact opposite of such
rules, just for the sake of contradiction and for expressing my grudge.
A stance that is both noble and revolutionary
I am totally aware that this is the mindset of a five-year old, but
sometimes I really don't mind acting like a child.
Oh, certainly. The adoption and rejection of conventions by a group
happens subconsciously most of the time, and that's how we operate on
that level. It works quite well...
Anno