Re: encapsulating directory operations

Liste des GroupesRevenir à cl c 
Sujet : Re: encapsulating directory operations
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 21. May 2025, 19:06:36
Autres entêtes
Organisation : None to speak of
Message-ID : <87a575zvmb.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Gnus/5.13 (Gnus v5.13)
"Paul Edwards" <mutazilah@gmail.com> writes:
"Keith Thompson" <Keith.S.Thompson+u@gmail.com> wrote in message
news:87ldqqzfj0.fsf@nosuchdomain.example.com...
[...]
Directory access is largely a solved problem.  If you insist on
creating yet another solution, I recommend following the existing
solutions.
>
Well - that would be:
>
struct dirent
{
[...]
}
[...]
And rmdir() - also flexible - allow failure
>
Are you sure - given the constraints - that a different interface
isn't appropriate?

I have not said or implied that the POSIX directory interface is the
only appropriate one.  It does have the considerable advantage that it
already exists.

My advice is to study and understand existing solutions before inventing
your own.  I can't offer meaningful advice on what's appropriate for
your language.

[...]

Do not mistake my idle comment for an endorsement.
>
I don't need an official endorsement. What I need to know
is that you can't think of any philosophical reason that the
C90 committee shouldn't have done that - had they chosen
to do so.

No, I don't believe you need to know that.  I consider the question of
what the C90 committee could theoretically have done in some alternate
timeline irrelevant.

[...]

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?
>
C90 *could* have added a way to refer to the escape character
(which exists, with different values, in both ASCII and EBCDIC).
The sensible way to do that would have been to allow a \e escape in
character constants and string literals.  Some languages have exactly
that feature, and several C compilers support it as an extension.
>
Ok, but for a C90+ or C91 or whatever standard - it would
require a change to the compiler itself to do the above.
>
That would be reasonable for a new language, but not for
the C90 committee.

There is no C90 committee.  That was 35 years ago.

Or my committee where I can't get any compiler vendor
at all (except for the compilers I control) to add such a thing.

You don't have a committee.

Still, you claim to be creating a new language that happens to be based
on C90.  Are you adding a new constraint that any differences between
C90 and your language cannot require compiler changes?

Changing existing library implementations is not significantly easier
than changing existing compiler implementations.  There are open source
implementations of both.

Updating a header file is a trivial change in comparison.
>
So I think a header file is the proper way to go.
>
Do you not agree with this?

I do not.

With this new information that you're unwilling to do anything that
requires compiler changes, it seems to me that you can achieve your
goals by taking an existing conforming C90 implementation and adding
some library code (headers and implementation).

Or if you can at least understand why I would prefer a
header  file - would you update an existing one or create
a new one (perhaps "c90ext.h" - C90 extensions), and
throw this define in - and what name would you give
this define?
>
No other special character values are defined as named constants
in headers.
>
Perhaps they should be.
>
Perhaps I would have favored standardizing \e at the time, but that
ship sailed decades ago.  I'd probably favor a proposal to add \e
to C2y.
>
This "ship sailed" is some sort of semantic issue.
>
As you noted - C2y can be updated.
>
And also I can create a C90+ standard outside of
anything ISO does.
>
The ship hasn't sailed, from my point of view.

The ship that has sailed is the C90 standard.

One more time, C90 itself will not change.  You're free to define your
own language/library/whatever based on C90, but it will not be C90.

I have stayed in port for the last nearly 40 years.
>
In practice, if I need an escape character, I use '\x1b'.  I've never
needed to use an EBCDIC escape character.  If I did, I'd use '\x27'.
If I needed to support both ASCII and EBCDIC escape characters,
I'd find a way to do that.
>
Thats's my question - "find a way". Specifically - what way?
>
None of this requires language or standard
library support.
>
It is unclear to me why you are saying that. First of all, you
haven't specified what "find a way" is.

I have: "support both ASCII and EBCDIC escape characters".  It's not
something I've ever needed to do, so I have not spent time or effort
deciding how to do it.

So I don't know what the alternative is to updating the
language standard.

You mean creating your own language standard based on the existing C90
standard.  C90 itself will change.  Please be clear on that point.

I can't think of any other way to control an ASCII/EBCDIC
ANSI X3.64 terminal without language/library support.

But there's no such thing.  I recall looking into this last time we
discussed this, and ANSI X3.64 is defined in terms of ASCII.  As far as
I know, no existing terminal or emulator uses the EBCDIC escape
character, and I see no need for a terminal that does so.  (Terminals
used with mainframes operate very differently.)

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
20 May 25 * encapsulating directory operations308Paul Edwards
20 May 25 +* Re: encapsulating directory operations83Lawrence D'Oliveiro
20 May 25 i+* Re: encapsulating directory operations20Paul Edwards
21 May 25 ii`* Re: encapsulating directory operations19Lawrence D'Oliveiro
21 May 25 ii `* Re: encapsulating directory operations18Paul Edwards
21 May 25 ii  `* Re: encapsulating directory operations17Lawrence D'Oliveiro
21 May 25 ii   +* Re: encapsulating directory operations3Paul Edwards
22 May 25 ii   i`* Re: encapsulating directory operations2Lawrence D'Oliveiro
22 May 25 ii   i `- Re: encapsulating directory operations1Kaz Kylheku
22 May 25 ii   `* Re: encapsulating directory operations13James Kuyper
22 May 25 ii    `* Re: encapsulating directory operations12Lawrence D'Oliveiro
22 May 25 ii     `* Re: encapsulating directory operations11James Kuyper
22 May 25 ii      `* Re: encapsulating directory operations10Lawrence D'Oliveiro
23 May 25 ii       `* Re: encapsulating directory operations9James Kuyper
23 May 25 ii        `* Re: encapsulating directory operations8Kaz Kylheku
23 May 25 ii         +* Re: encapsulating directory operations3Paul Edwards
23 May 25 ii         i+- Re: encapsulating directory operations1Kaz Kylheku
24 May 25 ii         i`- Re: encapsulating directory operations1Lawrence D'Oliveiro
23 May 25 ii         `* Re: encapsulating directory operations4James Kuyper
23 May 25 ii          `* Re: encapsulating directory operations3Kaz Kylheku
24 May 25 ii           `* Re: encapsulating directory operations2James Kuyper
24 May 25 ii            `- Re: encapsulating directory operations1Kaz Kylheku
31 May 25 i`* Re: encapsulating directory operations62Bonita Montero
31 May 25 i `* Re: encapsulating directory operations61Lawrence D'Oliveiro
1 Jun 25 i  `* Re: encapsulating directory operations60Bonita Montero
1 Jun 25 i   `* Re: encapsulating directory operations59Lawrence D'Oliveiro
2 Jun 25 i    `* Re: encapsulating directory operations58Bonita Montero
3 Jun 25 i     +* Re: encapsulating directory operations2James Kuyper
3 Jun 25 i     i`- Re: encapsulating directory operations1Kaz Kylheku
3 Jun 25 i     +* Re: encapsulating directory operations9Lawrence D'Oliveiro
10 Jun 25 i     i`* Re: encapsulating directory operations8Bonita Montero
10 Jun 25 i     i +- Re: encapsulating directory operations1Bonita Montero
10 Jun 25 i     i +- Re: encapsulating directory operations1Kaz Kylheku
11 Jun 25 i     i `* Re: encapsulating directory operations5Lawrence D'Oliveiro
11 Jun 25 i     i  `* Re: encapsulating directory operations4Bonita Montero
11 Jun 25 i     i   +- Re: encapsulating directory operations1Lawrence D'Oliveiro
11 Jun 25 i     i   `* Re: encapsulating directory operations2Bonita Montero
12 Jun 25 i     i    `- Re: encapsulating directory operations1Lawrence D'Oliveiro
3 Jun 25 i     `* Re: encapsulating directory operations46Bonita Montero
6 Jun 25 i      `* Re: encapsulating directory operations45Bonita Montero
6 Jun 25 i       `* Re: encapsulating directory operations44Bonita Montero
6 Jun 25 i        `* Re: encapsulating directory operations43Bonita Montero
6 Jun 25 i         `* Re: encapsulating directory operations42wij
7 Jun 25 i          `* Re: encapsulating directory operations41Bonita Montero
7 Jun 25 i           `* Re: encapsulating directory operations40wij
7 Jun 25 i            `* Re: encapsulating directory operations39Bonita Montero
7 Jun 25 i             `* Re: encapsulating directory operations38wij
7 Jun 25 i              `* Re: encapsulating directory operations37Bonita Montero
7 Jun 25 i               +* Re: encapsulating directory operations22wij
7 Jun 25 i               i+- Re: encapsulating directory operations1Bonita Montero
8 Jun 25 i               i`* Re: encapsulating directory operations20Bonita Montero
8 Jun 25 i               i +* Re: encapsulating directory operations12Muttley
8 Jun 25 i               i i`* Re: encapsulating directory operations11Bonita Montero
8 Jun 25 i               i i `* Re: encapsulating directory operations10Muttley
8 Jun 25 i               i i  +* Re: encapsulating directory operations3Bonita Montero
9 Jun 25 i               i i  i`* Re: encapsulating directory operations2Muttley
9 Jun 25 i               i i  i `- Re: encapsulating directory operations1Bonita Montero
8 Jun 25 i               i i  +* Re: encapsulating directory operations2Kaz Kylheku
10 Jun 25 i               i i  i`- Re: encapsulating directory operations1Tim Rentsch
8 Jun 25 i               i i  +- Re: encapsulating directory operations1Bonita Montero
9 Jun 25 i               i i  +- Re: encapsulating directory operations1wij
9 Jun 25 i               i i  `* Re: encapsulating directory operations2Muttley
9 Jun 25 i               i i   `- Re: encapsulating directory operations1Bonita Montero
8 Jun 25 i               i +* Re: encapsulating directory operations5wij
8 Jun 25 i               i i`* Re: encapsulating directory operations4Bonita Montero
8 Jun 25 i               i i `* Re: encapsulating directory operations3wij
8 Jun 25 i               i i  `* Re: encapsulating directory operations2Bonita Montero
8 Jun 25 i               i i   `- Re: encapsulating directory operations1wij
9 Jun 25 i               i `* Re: encapsulating directory operations2Lawrence D'Oliveiro
9 Jun 25 i               i  `- Re: encapsulating directory operations1Bonita Montero
7 Jun 25 i               `* Re: encapsulating directory operations14Janis Papanagnou
8 Jun 25 i                `* Re: encapsulating directory operations13Bonita Montero
8 Jun 25 i                 +- Re: encapsulating directory operations1Chris M. Thomasson
8 Jun 25 i                 `* Re: encapsulating directory operations11Bonita Montero
9 Jun 25 i                  +* Re: encapsulating directory operations8Bonita Montero
9 Jun 25 i                  i+* Re: encapsulating directory operations6Bonita Montero
9 Jun 25 i                  ii+- Re: encapsulating directory operations1Bonita Montero
10 Jun 25 i                  ii+* Re: encapsulating directory operations3Muttley
10 Jun 25 i                  iii+- Re: encapsulating directory operations1Muttley
10 Jun 25 i                  iii`- Re: encapsulating directory operations1Chris M. Thomasson
10 Jun 25 i                  ii`- Re: encapsulating directory operations1Waldek Hebisch
9 Jun 25 i                  i`- Re: encapsulating directory operations1Richard Heathfield
10 Jun 25 i                  `* Re: encapsulating directory operations2Tim Rentsch
10 Jun 25 i                   `- Re: encapsulating directory operations1Bonita Montero
20 May 25 +* Re: encapsulating directory operations74Keith Thompson
20 May 25 i+* Re: encapsulating directory operations28Richard Heathfield
20 May 25 ii+- Re: encapsulating directory operations1Paul Edwards
20 May 25 ii+- Re: encapsulating directory operations1David Brown
20 May 25 ii+* Re: encapsulating directory operations7Kaz Kylheku
20 May 25 iii`* Re: encapsulating directory operations6Richard Heathfield
20 May 25 iii +* Re: encapsulating directory operations2Muttley
20 May 25 iii i`- Re: encapsulating directory operations1Paul Edwards
20 May 25 iii `* Re: encapsulating directory operations3Paul Edwards
20 May 25 iii  `* Re: encapsulating directory operations2Richard Heathfield
20 May 25 iii   `- Re: encapsulating directory operations1Paul Edwards
23 May 25 ii`* Re: encapsulating directory operations18Tim Rentsch
23 May 25 ii +* Re: encapsulating directory operations6Richard Heathfield
24 May 25 ii i`* Re: encapsulating directory operations5Tim Rentsch
24 May 25 ii i `* Re: encapsulating directory operations4Richard Heathfield
28 May 25 ii i  `* Re: encapsulating directory operations3Tim Rentsch
28 May 25 ii i   `* Re: encapsulating directory operations2Richard Heathfield
26 May 25 ii `* Re: encapsulating directory operations11Peter 'Shaggy' Haywood
20 May 25 i`* Re: encapsulating directory operations45Paul Edwards
20 May 25 +* Re: encapsulating directory operations145Kaz Kylheku
21 May 25 +* Re: encapsulating directory operations3Janis Papanagnou
22 May 25 +- Re: encapsulating directory operations1Bonita Montero
25 May 25 `- Re: encapsulating directory operations1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal