Re: the Linux man-pages as an educational tool... and a bit about C.
"Αγαθοκλής Χατζημανίκας" <[email protected]> Mon, 3 Aug 2026 13:28:53 +0300
| Newsgroups | org.kernel.vger.linux-man |
|---|---|
| Message-ID | <anBtZdq5KH-O_Pqq@CHATZ> |
Hi Alex, I want to start by saying, that I think your motivation is crystal clear to any objective observer. And you are perfectly right! Has anybody denied that those functions don't operate on strings? They don't even know what is the '\0' byte so they don't care about it at all. They operate on the memory region and they do it unmercifully. Alex, there isn't any kind of mercy in the environment we breath. This is a crucial point to realize. Now, it doesn't really/really matters which is the right header. Of course it is a header that exposes those functions. It isn't of course <string.h> but again it doesn't really matters. It could be matter if [g]libc.so was splitted in myriads of libraries, and the programmer [-l]inked with the corresponded library. This is not the case here. As others have been said you could just include <[g]libc.h> and been done with that. Now, while you are perfectly right in principle, what it matters is exactly what are you doing! Recording the CAVEATS, mentioning alternatives, exposing deficiencies, etc. In other words being honest with what you are doing. And you are and this is impressive and you deserve appreciation. Man pages and without a second thought is the most valuable resource for any C programmer, you don't even want to think C programming without them! My opinion is that they are very well thought and constructed, with the usual wisdom of our ancestors, without bells and whistles and undoubtedly one of our precious jewels. Alex: They matter about the standards, please don't forget that. No matter if the standard is right or wrong, this is what we have. Libc'es and compilers are following them. That is not to say that we have to surrender and obey to them as the ultimate truth, when it clearly is not. We still have to give our best to fight for the evolution. But fighting for the header is a loosing battle. Others: And while we all love tersenes and compactness, I strongly believe that they are also an educational tool. There is still a room for this. In my opinion this is also a fair objective by Alex, so please encourage him, as it is for our own good also and we've to feel lucky we've him in this position. Someone is getting really serious with his role! And this is extraordinary in our current time. But and to be a bit cruel here. Does it really matters? Are going to be new programmers? Who we'll taught? At this point and generally speaking for our current environment and specifically about C. The C programming language it was the cornerstone of our programming universe. But, today we live in the kindgom of Rust! Coreutils were written in Rust and i think ubuntu adopted them. A C compiler has been written in Rust. Bun is written in Rust. Claude writes Rust! Given those facts, programmers will be just reviewers! But you are some of the best ever born programmers, and you should perfectly understand that: How on earth a reviewer can understand the mistake, if she never codes? And especially Rust which is zillion of times more complicated than C? So in absence of logic in our world, C has an incalculable important role to play in time (if of course we'll be blessed with time). As a song with that same name says: It takes an ocean of trust in the kingdom of rust... So even if we paint a wall in the desert, and when we finish a car runs fast and sand destroys the fine painting, there is no other thing to do than to repaint the wall. Given that we all have to ask by Alex, to continue with what he is doing, as what he is doing is doing it with respect, and today this is precious. Have a good afternoon, p.s., i'm rather uneducated. But I started learn C in my 52 and I wrote a libc. I believe that the standard should open some bits the horizons, and be more open to higher abstractions, e.g., A copy/read/write/rm/rename file/dir (a good part of coreutils functionality) can be part of the standard. C is about algorithms. If an algorithm works once in C, it will work forever. If the C community consentrates to write all the kind of algorithms with care and love) C will have a role. Otherwise we should be prepared for the inevitable.