Sujet : Re: encapsulating directory operations
De : mutazilah (at) *nospam* gmail.com (Paul Edwards)
Groupes : comp.lang.cDate : 21. May 2025, 01:31:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100j6sn$2g2cg$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Microsoft Outlook Express 6.00.2800.1106
"Kaz Kylheku" <
643-408-1753@kylheku.com> wrote in message
news:20250520163755.523@kylheku.com...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.
There was a reason they weren't implemented.
Probably the same reason they weren't in K&R C either.
Ritchie had the floor to himself. HE chose not to implement it.
Because directories don't really exist everywhere.
But - they sort of do. The concept is - or can be - there.
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.
You have stated the problem. I want to run on some
definition of "absolutely everywhere" that is different
from "many systems".
That's why I'm still on C90, for that "absolutely everywhere",
and now proposing a slight change so that "absolutely
everywhere" is still technically possible. Even on standard MVS.
BFN. Paul.
| Date | Sujet | # | | Auteur |
| 8 Apr 26 | … | | | |
Haut de la page
Les messages affichés proviennent d'usenet.
NewsPortal