TvP> The major flaw in your reasoning is the assertion that my code
TvP> would be mostly for others. My production code is not, never.
my rules for coding:
code is for humans, not computers
code is for others, not yourself.
if you care so little about how others read your code, why not just
program in assembler or (gasp!) lisp? code is a way to describe the
logic of your program. it is not just instructions to the computer. we
pick a language which we like because it allows us to more easily
express our ideas, not because it makes the life of the computer
easier. now you may think you are the only one to read your code, but
that is not necessarily true. ever read and work with your own code (in
production!) 10 years later? you will most likely think the original
coder was a moron. i did
TvP> Firstly, I am the one who types it. With a German keyboard layout
TvP> (and my particular way of using finger/hand combinations to
TvP> produce certain characters), " is more comfortably produced than
TvP> '. This is because the little finger of my left hand hits the
TvP> left shift key and, while holding it down, the middle finger of
TvP> the same hand hits the key "2". For a single quote, I need two
TvP> hands (since I don't use the right shift key).
so get a better editor. i map keys in emacs to change keyboard layout
quirks (control to where $DIETY intended it, to the left of 'A').
you espouse using a syntax highlighting editor so this is the same
thing.
TvP> Secondly, I am also the one who spends more time reading my own
TvP> stuff than others do. I for sure know that I wont even trigger an
TvP> editor when I know it's not vim (or when I know it's vim but the
TvP> terminal doesn't support colors). Yes, I can be a bitch when my
TvP> programming environment isn't exactly as I want it.
ahh, so some others do read your code. then you are being selfish by not
coding for them. code doesn't live in a vacuum. it is a document of your
logic. others need as much semantic help as they can when reading
it. this is no different than picking good variable names (just a
smaller set of choices).
TvP> And in the case that anyone other than me wants to read my code,
TvP> well, then he has to live with my style conventions. I'd rather
TvP> tell him to get a proper editor than chaning my style and feel
TvP> uncomfortable all the time.
and you should get an editor that would help you type ' as easily as ".
TvP> Of course, things are entirely different when the programming is
TvP> carried out in a collaborative fashion with many people being on
TvP> the project. In such situations, I am happily willing to follow
TvP> whatever coding convention has been agreed on.
but you agree to use perl. perl has both quote styles for a reason. do
you use poor perl contructs elsewhere? no as you know better perl than
that. this is the same thing.
and even though i might not convince you, so this is for those others
who will read this thread.
uri