Liste des Groupes | Revenir à cl c |
"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?
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.
>>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.
Or my committee where I can't get any compiler vendor
at all (except for the compilers I control) to add such a thing.
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?
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.
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.
So I don't know what the alternative is to updating the
language standard.
I can't think of any other way to control an ASCII/EBCDIC
ANSI X3.64 terminal without language/library support.
Les messages affichés proviennent d'usenet.