Sujet : Re: encapsulating directory operations
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 20. May 2025, 22:41:55
Autres entêtes
Organisation : None to speak of
Message-ID : <87a5770xjw.fsf@nosuchdomain.example.com>
References : 1 2 3
User-Agent : Gnus/5.13 (Gnus v5.13)
"Paul Edwards" <
mutazilah@gmail.com> writes:
[...]
So is it right to expect directories to be covered by C90?
Of course not. C90 is frozen, defined by the ISO standard published
in 1990. It is an obvious fact, that you cannot have missed,
that the C90 standard does not support operations on directories.
(Neither does any later ISO C standard.)
I'm guessing that you meant something by "expect" that differs from
its usual meaning. Can you clarify?
There is an existing secondary standard that does provide support
for directories, among a lot of other things. POSIX. If I wanted
a system that was based on C90 and could handle directories,
I can't think of a good reason not to use C90+POSIX. (You might
have ideological reasons to insist on an earlier edition of POSIX.)
(MS Windows does not directly support POSIX, or at least does not
do so usefully, but my impression is that you don't care about that.)
If you want to define your own language based on C90, you're free
to do so. You've talked about "extending" C90. Some people here
have interpreted that to mean you want to change what C90 is, so
there's something called "C90" that includes some stuff you've added.
Calling your language "C90" will cause confusion and some anger.
But you can do exactly the same thing by defining a *new* language
*with a different name* that's based on C90 with whatever additions
you want. The name can even start with "C", just as "C++" does.
Many of us think that would be a waste of time, but it's not our
time that's being wasted.
And if you want your new language to support directory operations,
my advice would be to incorporate POSIX directory operations into
your new language's standard library.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */