Deutsch English Français Italiano |
<8734f7rw7z.fsf@nosuchdomain.example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson <Keith.S.Thompson+u@gmail.com> Newsgroups: comp.lang.c Subject: Re: Suggested method for returning a string from a C program? Date: Thu, 20 Mar 2025 18:47:12 -0700 Organization: None to speak of Lines: 78 Message-ID: <8734f7rw7z.fsf@nosuchdomain.example.com> References: <vrd77d$3nvtf$2@dont-email.me> <868qp1ra5f.fsf@linuxsc.com> <vrdhok$47cb$2@dont-email.me> <20250319115550.0000676f@yahoo.com> <vreuj1$1asii$4@dont-email.me> <vreve4$19klp$2@dont-email.me> <20250319201903.00005452@yahoo.com> <86r02roqdq.fsf@linuxsc.com> <vrh1br$35029$2@dont-email.me> <LRUCP.2$541.0@fx47.iad> <vrh71t$3be42$1@dont-email.me> <874izntt5t.fsf@nosuchdomain.example.com> <vrhviu$h5c$1@dont-email.me> <87ecyrs332.fsf@nosuchdomain.example.com> <vri9t1$a29t$1@dont-email.me> <20250320171505.221@kylheku.com> <vrif1v$c9ev$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Fri, 21 Mar 2025 02:47:15 +0100 (CET) Injection-Info: dont-email.me; posting-host="279d8aeca4b8e8a9dbe8bc9eae075af5"; logging-data="487937"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19aVJuk0e0L5H4ThBDhSgTx" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:QtWclKwkOSgoHpzDurqoabqgTZA= sha1:yPojeJ5H7xJFVfM98CFrC0rUb5Q= Bytes: 4836 bart <bc@freeuk.com> writes: > On 21/03/2025 00:46, Kaz Kylheku wrote: >> On 2025-03-20, bart <bc@freeuk.com> wrote: >>> On 20/03/2025 23:18, Keith Thompson wrote: >>>> bart <bc@freeuk.com> writes: >>>>> On 20/03/2025 19:10, Keith Thompson wrote: >>>>>> bart <bc@freeuk.com> writes: >>>> [...] >>>>>>> stdint.h et al are just ungainly bolt-ons, not fully supported by the >>>>>>> language. >>>>>> No, they're fully supported by the language. They've been in the ISO >>>>>> standard since 1999. >>>>> >>>>> I don't think so. They are add-ons that could have been created in >>>>> user-code even prior to C99 (user-defined typedefs for 64 bits would >>>>> 'need long long'). >>>> >>>> Sure, they could; see Doug Gwyn's q8, for example. >>> >>> Isn't that what I said? However I've just looked at this 700-line header: The first thing you said was "I don't think so", in response to a true statement that I made. Following that, I wrote "Sure, they could....". I was agreeing with you and providing an example. Is that a problem? [...] > I just tried to compile it; it needs an extra q8defs.h file (600 more > lines), but it fails: "CPU not recognised" (it might have a point if > this was from the 1990s!). It is from the 1990s. The web page was last updated in 1999. It hasn't been updated since then because it's no longer necessary, since <stdint.h> is part of the language and almost universally supported. ("gcc -std=c90 -pedantic-errors" doesn't even complain about <stdint.h>; apparently it treats it as an implementation-defined header, the kind of thing that most C software uses.) > gcc just gives lots of errors. To me it's all an ugly lot of code > which reminds me of what system headers looked like: a messy, fragile > patchwork of #ifdef blocks. You're complaining about how much work it is. All that work has been done for you by the implementers. Decades ago. I just did a quick test comparing complation times for an empty program with no #include directives and an empty program with #include directives for <stdint.h> and <inttypes.h>. The difference was about 3 milliseconds. I quite literally could not care care less. >>> of the core language, it would be zero lines. >> This kind of argumentation is really not of good quality. >> A feature requires lines of code. If those lines are not in some >> satellite file like a C header, then they are elsewhere, like in the >> compiler source code. > > Doing stuff the C way requires LOTs of lines of code. Look at all > those MIN/MAX macros, the PRINT/SCAN macros; there's hundreds of them! So what? I don't have to read those lines of code. All I have to read is the standard (or some other document) that tells me how to use it. [...] > I don't bother with LEAST/FAST types, whatever those mean. Where did > that all come from anyway? I've never seen those used. I'd explain, but I've never known you to be grateful or even interested when someone gives you information. If you actually wanted to know what they mean, you could consult the standard. If you don't care about something (and you're not obligated to care about anything), please don't ask about it. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */