| Deutsch English Français Italiano |
|
<20250520163755.523@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.lang.c Subject: Re: encapsulating directory operations Date: Wed, 21 May 2025 00:18:15 -0000 (UTC) Organization: A noiseless patient Spider Lines: 47 Message-ID: <20250520163755.523@kylheku.com> References: <100h650$23r5l$1@dont-email.me> <20250520065158.709@kylheku.com> <100i2la$292le$1@dont-email.me> <87a5770xjw.fsf@nosuchdomain.example.com> <100j09o$2f04b$1@dont-email.me> <100j232$2fb3a$1@dont-email.me> Injection-Date: Wed, 21 May 2025 02:18:15 +0200 (CEST) Injection-Info: dont-email.me; posting-host="fb9d07d77f399b69ba9c9af9886af57e"; logging-data="2619794"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CoxpLpYVc2ZOUPiK7ndISHf+NkzSSjqs=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:FpjEvUR6UvSOR75Tss6wagx/35k= On 2025-05-20, Paul Edwards <mutazilah@gmail.com> wrote: > "Paul Edwards" <mutazilah@gmail.com> wrote in message > news:100j09o$2f04b$1@dont-email.me... > >> Manipulating directories is not as important as manipulating >> files. The C90 people didn't leave out file manipulation (I >> think the ISO Pascal people left it out, at least originally). > > Actually, I think it was program paramaters that weren't > specified. > > But again - maybe it is C90 that was wrong to specify argc > and argv and the Pascal people got it right. > > That depends on the philosophy of language standards. > > And I am not personally familiar with the philosophy of > language standards. ANSI C was codifying a lot of existing practices. C programs starting with a main() function which takes argc and argv was in this category. It came from Unix, and C implementations on other platforms imitated that. C appeared as the systems programming language of Unix. C on Unix had a way to process directories via library functions. Implementors of C on other systems choose to implement some functions from Unix, and not others. They didn't implement the directory-related ones, rendering them nonportable, and unsuitable for standardizing into the language. From my understanding, C and Unix standardization were separate but somewhat coordinated efforts. Unix things that didn't get into C were standardized by the emerging Unix standard. Today, if I want a program tha tneeds to walk directories, I use the POSIX C library. It is widely implemented. The program won't run absolutely everywhere, but it will run on many embedded systems, as well as supercomputers, and everything in between. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca