Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: question about linker Date: Tue, 03 Dec 2024 17:19:12 -0800 Organization: A noiseless patient Spider Lines: 31 Message-ID: <86iks0mei7.fsf@linuxsc.com> References: <8734j9sj0f.fsf@nosuchdomain.example.com> <87ttbpqzm1.fsf@nosuchdomain.example.com> <86v7w1muem.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 04 Dec 2024 02:19:12 +0100 (CET) Injection-Info: dont-email.me; posting-host="24be5a3bcc5136b6a89c55a2b150290e"; logging-data="477935"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HdxKmc9taG9E7mHzbxoDW9YvGjLMFDjA=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:lKd13DMhJGXukNVCFbe4E+OMblQ= sha1:ybccN2O1PZ/HqQKo/I+RpHoF9r0= Bytes: 2764 scott@slp53.sl.home (Scott Lurndal) writes: > David Brown writes: > >> On 03/12/2024 02:23, Tim Rentsch wrote: >> >>> scott@slp53.sl.home (Scott Lurndal) writes: > >> >>> 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). >> >> A general guideline followed by most people is to have the length of >> identifiers (or their semantic content) increase with larger scope of >> the identifier. "i" is fine as a counter of a small loop, but you would >> not want to use it for a file-scope static. >> >> Which abbreviations are appropriate is often context-dependent. As long >> as the context is clear, they can be very helpful - in a genetics >> program, you would definitely want to use "DNA_string" in preference to >> "deoxyribonucleic_acid_string" as an identifier! > > I agree with both of these. In addition, when processing > character strings, I'll often use 'cp' as a character pointer. My rule is not to use abbreviations, only words (with the short-non-word exception noted earlier). Widely known and commonly used acronyms, such as DNA, HTML, or TCP, are considered words, not abbreviations.