Sujet : Re: question about linker
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 04. Dec 2024, 13:08:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vipgns$rjqn$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
On 03/12/2024 17:12, Janis Papanagnou wrote:
On 03.12.2024 16:24, David Brown wrote:
On 03/12/2024 13:34, Bart wrote:
[...]
>
Of course lots of C programmers have never read the standards. But they
generally know that they don't know these details, and don't try to
pretend that the language details that they don't know are confusing.
They simply get on with the job of writing clear C code as best they can.
I feel an urge to point out that the C standard is not necessary to
understand concepts that can be read about in textbooks or inferred
(or just tried out, if the available sources are unclear about some
detail).
Sure. And it is certainly /possible/ to know all the small details of C without ever reading the standards. But it's quite unlikely. This was a small detail of how declaring a function from inside a block interacts with a definition of the same function in the same unit. That is not something that will occur often in real code - it only came up because Bart is an expert at thinking up things in C that confuse him. In the real world, programmers simply don't do that kind of thing - and the kind of C programmer who is interested in these details will almost certainly also be interested in reading the standards.
Most C programmers never look at the standards - textbooks, decent reference sites (like
www.cppreference.com), common sense, and trial and error with quality compilers is sufficient for most programmers.
There's nothing at all wrong with not knowing the whole language, or not having read the standards. There's nothing wrong with saying "I find this thing in C confusing" when you don't know how it works. But there /is/ something wrong with saying "C /is/ confusing" when you haven't learned how it works or consulted the standards and good references. The first is accepting personal responsibility, so that you can either learn about the feature or accept that it is a feature you want to avoid in your programming. The second is trying to pass the buck - blame your tools, blame other people, blame anyone but yourself. (If you find a feature in the language that you understand and have read about in the standards, and which a large proportion of programmers have trouble with - /then/ you have justification for saying that this particular feature of C is confusing.)