Sujet : Re: question about linker
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 03. Dec 2024, 16:09:22
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vin6v4$4pqq$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 03.12.2024 02:23, Tim Rentsch wrote:
In my view case-insensitive matching/lookup is clearly worse than
case-sensitive matching. There may be some contexts where a
case-insensitive rule is tolerable or even preferable, but offhand
I'm not thinking of one. Of course sometimes I do want matching
to allow either case, for which 'grep -i' or some other common
tool solves the problem; the key is that it's my choice, not
a fixed choice imposed by a procrustean software system.
These days, where case-sensitive data is normal, the often seen
case-insensitive default for searching is a pain, IMO.
What I'd prefer is; if I search with mixed case terms I want to
get case sensitivity. Or more generally, a deliberate use of the
shift key should be an indication of a case-sensitive search.
(This of course might not be helpful or even bad for folks who
are used to copy/paste with the mouse, where the first character
might just be capitalized to match the locale/language rules.)
My complaint about CamelCase (or camelCase, which I put in the same
category) is that my eyes have to work quite a bit harder compared
to text using underscores between words. Reading either form of
camelCase is slower, and also requires more mental effort, relative
to using underscores.
That's certainly true. (This would also be an argument in favor
of Algol 68's "identifiers with spaces" feature.)
Exception: CamelCase for a short noun phrase
(up to perhaps three or four words) seems to work well for type
names, probably because I can recognize the phrase as a whole
without needing (most of the time) to look at the individual words.
That property does not hold for names of variables or functions.
We used (I think it was also a common convention) to start class
and type names with a capital letter, all the rest starting with
lower case, with the exception of C-preprocessor elements that we
wrote in all caps (but that we anyway only rarely used in C++).
For the most part I don't use abbreviations in the usual sense of
the word, although I do sometimes use short non-words in a small
local context (here "short" means usually one or two letters, and
never more than four or five).
Also sensible (and I think quite typical); to consider local and
global visibility, and differentiate technical and semantical
entities. By abbreviations in the previous post I associated also
common abbreviations (XML, SQL, IP) which in case of camel-case
were written like word components (Xml, Sql, Ip).
But much of all that are personal preferences or conventions that
have to be followed for consistency as part of companies' coding
standards.
Janis