Re: encapsulating directory operations

Liste des GroupesRevenir à cl c 
Sujet : Re: encapsulating directory operations
De : mutazilah (at) *nospam* gmail.com (Paul Edwards)
Groupes : comp.lang.c
Date : 21. May 2025, 00:57:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100j4t3$2foah$1@dont-email.me>
References : 1 2 3
User-Agent : Microsoft Outlook Express 6.00.2800.1106
"Keith Thompson" <Keith.S.Thompson+u@gmail.com> wrote in message
news:87tt5ezx9y.fsf@nosuchdomain.example.com...
"Paul Edwards" <mutazilah@gmail.com> writes:
"Keith Thompson" <Keith.S.Thompson+u@gmail.com> wrote in message
news:87a5770xjw.fsf@nosuchdomain.example.com...
"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?
>
When C90 was being written - or indeed - when K&R was
being written - if there hadn't been pressure to "bring to market",
would you EXPECT a language standard - any language
standard - but in this specific instance the ISO/IEC 9899:1990
committee - to have included a standard form of directory
manipulation?
>
Ah, that's a very different question.  I have no answer, because
I don't care.  C90 is what it is.  Of course it could have been different.

My question is not "could", it is "should", or "ideally".

As far as I know, there was never any LOGICAL barrier
to including basic directory manipulation in C90.
>
None that I can think of.

Ok, that's a great start. That answers one of my questions.

But it could potentially be even neater if it was hidden
away behind a standard fopen etc call.
>
That's my question.
>
Sure, it would be theoretically possible to treat directories as files,
and to make reading from a FILE* resulting from calling fopen() with a
directory name give you access to the directory entries.
>
I don't think it would be a particularly good idea.

Can you tell me why?

Why not hide it in fopen()? That's my original question.
>
Why should it be opendir() instead of fopen()?
>
That's my unanswered question.
>
You won't get a definitive answer.  In your own language, you can
do it that way or not.  My opinion on whether it's a good idea is
irrelevant, since I won't be using your language.

YOUR personal opinion is NOT irrelevant to ME.

Regardless of whether you use or don't use "my language".
Or whether it even exists.

It is mostly a comment on C90.

ie did the C90 people do anything wrong, in your opinion?

I might have
some interest in it being logically consistent, but directories do
not seem to present any such issues.  You can use fopen(), you can use
opendir(), you can invent your own functions, you can leave it out of
the language and depend on outside standards and/or libraries.

And I am not personally familiar with the philosophy of
language standards.

Because there's no such thing,

Thanks for that opinion.

nor does there need to be.

And thanks for that one too.

But perhaps you can elaborate, as I find that statement odd.

You may as well throw in the entire POSIX, the entire C23,
and the entire C++ into C90 too. There needs to be some
philosophy to set constraints.

One of the constraints was that they were merely trying to
document existing practice, not create a new language.

Although they added wonderful things like memmove().

And there were time constraints too.

And lack of hindsight constraints too.

Different
languages are designed by different people with different goals and
motivations.  I doubt that anyone here can tell you anything useful
about how your personal language should be defined.  You can do whatever
you like.

It's not about me. Obviously I can do whatever I want.

C90 wasn't designed by one person. K&R C was more-or-less
designed by one person. But I don't want a language designed
by one person.

I want a language that is accepted by a committee.

Not the C99 committee. Not the C23 committee.

The C90+ committee. I would probably decide who gets
to sit on the committee though.

I probably wouldn't allow you personally to sit on the committtee,
because you appear to be hostile to the committee's goals.

But I would appreciate your guidance for the committee.

Richard would probably be on the committee, as he has
a shared goal. It's not likely that he wants to though, and
note that the committee doesn't formally exist yet. And
nor does it need to formally exist. It is enough to have
a discussion in comp.lang.c and when you, Keith, give
the go-ahead for directory manipulations to have been
incorporated into C90 - because you can't see anything
wrong with it - then the theoretical committee can
continue their work on directory manipulations in C90+.

Plus you just said above that it would be reasonable for
the POSIX directory operations to be directly incorporated
into C90+'s "standard library".
>
The C90 people didn't choose to do that.
>
That doesn't necessarily constrain the C90+ people.
>
Right.
>
But it does beg the question - would it have been
ACCEPTABLE for the ANSI 89 people to have
put that directory manipulation stuff into the C89
standard IF they could do so quickly?
>
Yes.
>
Or would that be an ABOMINATION?
>
No.  (WTF??)

I don't understand your question.

There are some things people consider to be abominations.

If the "far" keyword had been added to the C90 standard,
would that have been an abomination? Surely some will
say "yes". I have worked with people who think the whole
of C90 is an abomination and that only K&R C is acceptable.

What is the PHILOSOPHY about what SHOULD
be included in a standard?
>
Different standards have different goals.  I cannot advise you what your
own standard should be based on, since I don't agree with or care about
your goals.

I have a series of questions that begin with:

If xyz had been added to the C90 standard, would you have
considered that to be odd/wrong? If so, why?

Note that Ritchie himself objected to various things being
put into the C90 standard.

Why not you?

Ritchie is dead. You're not.

I don't see what bearing my opinion on C99 (or politics,
or anything) has on a technical discussion of C90, but
so be it.
>
It *should* have no bearing at all.  The problem is that if you
come here and say that C99 is a "complete and utter joke" or make
similarly inflammatory statements, people are going to react.
If you don't want that reaction, don't make statements like that.
>
I didn't say I didn't want the reaction. I don't care if there is
or isn't a reaction.
>
If you post inflammatory statements here, people will react.  I'm asking
you, for the sake of avoiding noise in this newsgroup, not to post such
statements here.

Some of it is background information.

ie "don't ask me to 'just use C99'". Or don't ask me "why not
use C99?". Or "why are you still talking about C90?".

What I care about is whether the technical question has been
addressed or not.
>
It hasn't been addressed. Nor has fpeek() in a previous thread.
Nor ESC_STR.
>
I don't remember what fpeek() is supposed to be;

See if a stream is known to have characters in it.

did you have a question about it?

If fpeek had been added to the C90 standard, would you have
considered that to be odd/wrong? If so, why? If not, what form
should it have taken?

I think I've discussed ESC_STR with you before.

But not to the point where these questions were answered:

If ESC_STR had been added to the C89 standard, because
a majority of the committee had decided they wanted to
support basic ANSI X3.64, would you have considered that
to be odd/wrong? If so, why? If not, do you think the define
ESC_STR and ESC_CHAR are a bad naming convention,
and if so, what do you think would have been better, and why?
And what header file would you have put them in?

If instead, C90 had already been published, and suddenly
committeee members realized they had forgotten about
ANSI X3.64 terminals and quickly formed a C91 standard
to add just this one feature, what header file would you
have put it in, and why?

BFN. Paul.



Date Sujet#  Auteur
20 May07:06 * encapsulating directory operations128Paul Edwards
20 May08:27 +* Re: encapsulating directory operations18Lawrence D'Oliveiro
20 May10:33 i`* Re: encapsulating directory operations17Paul Edwards
21 May01:10 i `* Re: encapsulating directory operations16Lawrence D'Oliveiro
21 May01:23 i  `* Re: encapsulating directory operations15Paul Edwards
21 May04:37 i   `* Re: encapsulating directory operations14Lawrence D'Oliveiro
21 May11:00 i    +* Re: encapsulating directory operations3Paul Edwards
22 May07:49 i    i`* Re: encapsulating directory operations2Lawrence D'Oliveiro
22 May08:02 i    i `- Re: encapsulating directory operations1Kaz Kylheku
22 May00:51 i    `* Re: encapsulating directory operations10James Kuyper
22 May06:04 i     `* Re: encapsulating directory operations9Lawrence D'Oliveiro
22 May19:13 i      `* Re: encapsulating directory operations8James Kuyper
22 May23:46 i       `* Re: encapsulating directory operations7Lawrence D'Oliveiro
23 May00:07 i        `* Re: encapsulating directory operations6James Kuyper
23 May00:15 i         `* Re: encapsulating directory operations5Kaz Kylheku
23 May00:26 i          +* Re: encapsulating directory operations2Paul Edwards
23 May01:44 i          i`- Re: encapsulating directory operations1Kaz Kylheku
23 May01:10 i          `* Re: encapsulating directory operations2James Kuyper
23 May03:08 i           `- Re: encapsulating directory operations1Kaz Kylheku
20 May10:18 +* Re: encapsulating directory operations56Keith Thompson
20 May10:33 i+* Re: encapsulating directory operations12Richard Heathfield
20 May10:45 ii+- Re: encapsulating directory operations1Paul Edwards
20 May12:42 ii+- Re: encapsulating directory operations1David Brown
20 May14:55 ii+* Re: encapsulating directory operations7Kaz Kylheku
20 May15:05 iii`* Re: encapsulating directory operations6Richard Heathfield
20 May15:09 iii +* Re: encapsulating directory operations2Muttley
20 May15:15 iii i`- Re: encapsulating directory operations1Paul Edwards
20 May15:48 iii `* Re: encapsulating directory operations3Paul Edwards
20 May16:02 iii  `* Re: encapsulating directory operations2Richard Heathfield
20 May16:28 iii   `- Re: encapsulating directory operations1Paul Edwards
23 May13:43 ii`* Re: encapsulating directory operations2Tim Rentsch
23 May14:27 ii `- Re: encapsulating directory operations1Richard Heathfield
20 May10:36 i`* Re: encapsulating directory operations43Paul Edwards
20 May13:23 i +* Re: encapsulating directory operations39David Brown
20 May14:47 i i`* Re: encapsulating directory operations38Paul Edwards
20 May15:37 i i +* Re: encapsulating directory operations10Richard Heathfield
20 May16:11 i i i`* Re: encapsulating directory operations9Paul Edwards
20 May16:43 i i i `* Re: encapsulating directory operations8Richard Heathfield
20 May22:15 i i i  +* Re: encapsulating directory operations2Paul Edwards
20 May23:50 i i i  i`- Re: encapsulating directory operations1Kaz Kylheku
21 May02:11 i i i  +- Re: encapsulating directory operations1Lawrence D'Oliveiro
21 May03:40 i i i  `* Re: encapsulating directory operations4James Kuyper
21 May05:50 i i i   `* Re: encapsulating directory operations3Richard Heathfield
21 May09:06 i i i    `* Re: encapsulating directory operations2David Brown
21 May09:27 i i i     `- Re: encapsulating directory operations1Richard Heathfield
20 May17:19 i i `* Re: encapsulating directory operations27David Brown
20 May17:43 i i  +* Re: encapsulating directory operations6Richard Heathfield
20 May18:14 i i  i+* Re: encapsulating directory operations4Kaz Kylheku
20 May18:20 i i  ii`* Re: encapsulating directory operations3Richard Heathfield
20 May19:50 i i  ii +- Re: encapsulating directory operations1Richard Heathfield
20 May20:34 i i  ii `- Re: encapsulating directory operations1Kaz Kylheku
21 May09:09 i i  i`- Re: encapsulating directory operations1David Brown
20 May17:51 i i  +- Re: encapsulating directory operations1Kaz Kylheku
20 May18:09 i i  +* Re: encapsulating directory operations2Richard Heathfield
20 May19:34 i i  i`- Re: encapsulating directory operations1Richard Heathfield
20 May22:41 i i  +* Re: encapsulating directory operations4Paul Edwards
20 May23:02 i i  i+- Re: encapsulating directory operations1Keith Thompson
21 May02:05 i i  i`* Re: encapsulating directory operations2Lawrence D'Oliveiro
21 May10:23 i i  i `- Re: encapsulating directory operations1Paul Edwards
20 May22:51 i i  +* Re: encapsulating directory operations9Paul Edwards
21 May05:31 i i  i`* Re: encapsulating directory operations8Richard Heathfield
21 May11:08 i i  i `* Re: encapsulating directory operations7Paul Edwards
21 May11:28 i i  i  +- Re: encapsulating directory operations1Richard Heathfield
21 May16:00 i i  i  `* Re: encapsulating directory operations5David Brown
21 May16:37 i i  i   `* Re: encapsulating directory operations4Richard Heathfield
21 May18:21 i i  i    +- Re: encapsulating directory operations1Michael S
22 May11:37 i i  i    `* Re: encapsulating directory operations2James Kuyper
22 May18:53 i i  i     `- Re: encapsulating directory operations1Kaz Kylheku
20 May23:09 i i  +- Re: encapsulating directory operations1Paul Edwards
21 May09:27 i i  `* Re: encapsulating directory operations3David Brown
21 May11:46 i i   `* Re: encapsulating directory operations2Paul Edwards
21 May15:46 i i    `- Re: encapsulating directory operations1David Brown
21 May01:12 i `* Re: encapsulating directory operations3Lawrence D'Oliveiro
21 May01:25 i  `* Re: encapsulating directory operations2Paul Edwards
21 May02:03 i   `- Re: encapsulating directory operations1Lawrence D'Oliveiro
20 May14:53 +* Re: encapsulating directory operations49Kaz Kylheku
20 May15:12 i`* Re: encapsulating directory operations48Paul Edwards
20 May22:41 i `* Re: encapsulating directory operations47Keith Thompson
20 May23:38 i  `* Re: encapsulating directory operations46Paul Edwards
21 May00:09 i   +* Re: encapsulating directory operations5Paul Edwards
21 May00:22 i   i+- Re: encapsulating directory operations1Keith Thompson
21 May01:18 i   i+* Re: encapsulating directory operations2Kaz Kylheku
21 May01:31 i   ii`- Re: encapsulating directory operations1Paul Edwards
21 May02:02 i   i`- Re: encapsulating directory operations1Lawrence D'Oliveiro
21 May00:18 i   +* Re: encapsulating directory operations31Keith Thompson
21 May00:57 i   i+* Re: encapsulating directory operations23Paul Edwards
21 May06:41 i   ii`* Re: encapsulating directory operations22Keith Thompson
21 May11:41 i   ii +* Re: encapsulating directory operations19Paul Edwards
21 May19:06 i   ii i+* Re: encapsulating directory operations16Keith Thompson
21 May19:22 i   ii ii+- Re: encapsulating directory operations1Keith Thompson
22 May22:10 i   ii ii+* Re: encapsulating directory operations11Paul Edwards
22 May23:32 i   ii iii+* Re: encapsulating directory operations9Keith Thompson
23 May00:16 i   ii iiii+* Re: encapsulating directory operations7Paul Edwards
23 May02:38 i   ii iiiii+- Re: encapsulating directory operations1Keith Thompson
23 May03:28 i   ii iiiii+* Re: encapsulating directory operations2Kaz Kylheku
23 May05:27 i   ii iiiiii`- Re: encapsulating directory operations1Keith Thompson
23 May06:08 i   ii iiiii`* Re: encapsulating directory operations3Janis Papanagnou
23 May06:20 i   ii iiiii `* Re: encapsulating directory operations2Keith Thompson
23 May06:43 i   ii iiiii  `- Re: encapsulating directory operations1Janis Papanagnou
23 May16:09 i   ii iiii`- Re: encapsulating directory operations1Richard Harnden
22 May23:44 i   ii iii`- Re: encapsulating directory operations1Paul Edwards
22 May23:06 i   ii ii`* Re: encapsulating directory operations3Paul Edwards
21 May20:31 i   ii i`* Re: encapsulating directory operations2Kaz Kylheku
22 May22:52 i   ii `* Re: encapsulating directory operations2Paul Edwards
21 May03:21 i   i`* Re: encapsulating directory operations7Kaz Kylheku
21 May03:26 i   +* Re: encapsulating directory operations7James Kuyper
21 May22:19 i   `* Re: encapsulating directory operations2Waldek Hebisch
21 May03:35 +* Re: encapsulating directory operations3Janis Papanagnou
22 May19:34 `- Re: encapsulating directory operations1Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal