🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Ron Guilmette Wed, 01 Aug 1990 02:48
Questions on the evolving standard.
#323
Author: Ron Guilmette
Date: Wed, 01 Aug 1990 02:48
63 lines
3735 bytes
I just want to say that now that this newsgroup has been established (finally)
I would hate to see it fill up with nothing but a load full of semi- good
pet ideas that everybody and his brother has been harboring for ages now
regarding ways to "improve" the language by tweeking this or tweeking that.

I have a couple of such ideas myself, but I'm going to try to restrain
myself from promoting to many of them here.

I'm not saying that such proposals are in any way unsuitable for this group.
NO! NO!  It's just that I'm hoping to *also* see discussions of the many
things which have simply gone unspecified in the official ANSI base documents.

There are (I feel) a lot of unspecified things in the current language
definition, and I really feel that we should be filling the cracks in the
foundation  every bit as much as we should be debating the details of the
design of the upper floors.

I'd now like to mention three examples of things that E&S seem to leave
unspecified.

First, is it legal for a compilation unit to contain zero file-scope
declarations?

Is a "null declarative" statement (i.e. just a lone semicolon) allowed
at the file-scope level?

Section 13.2 (Argument Matching) in E&S (pages 318 & 319) defines a
number of cases in which one particular implicit conversion (or
sequence of implicit conversions) are deemed "better" that some
other particular sequence.  Unfortunately, there is never any
"quantification" of exactly how much better each kind of conversion
is so that arbitrary possibilities for implicit conversion sequences
can be fully and precisely judged against one another.

For example, 13.2 says that converting a `T*' to a `const T*' is worse than
converting (or actually, not converting) a `T*' to a `T*'.  A little later,
it says that if C is derived (publically) from B and if B is derived
(publically) from A, then converting a C* to a B* is "better" than converting
to an A*.  But exactly how much better is it?

This question could become significant in contexts involving multiple
possible sequences of implicit conversions.  It's entirely possible
that there could be a case in which there existed two possible
sequences of implicit conversions, both of which rank otherwise as
equal, except that one involves a conversion from a T* to a const T* 
and a conversion from a C* to a B* and the other one involves
a conversion from a C* to an A*.  Which conversion (if either) would be
"better matching"?

The three unspecified things mentioned above are admitedly minor points,
but they need to be addressed in the final standard document.  Also,
I think that implementors would benefit by seeing such things discussed here.

One final note.  The biggest thing that seems to be left unspecified in
E&S is the whole subject of standard libraries and header files.  Are
there any?  Are the libraries and header files mandated by the ANSI C
standard considered a part of "standard" C++?  How about the libraries
and header files called for in Bjarne's original book (e.g. <stream.h>)?

I imagine that the issue of libraries has already surfaced (and perhaps
even been resolved) in the x3j16 meetings.  Perhaps one of the x3j16
members could be encouraged to give us a short progress report based
on the most recent meeting.
Re: Questions on the evolving standard.
#363
Author: Chip Salzenberg
Date: Fri, 17 Aug 1990 16:08
19 lines
1418 bytes
According to rfg@lupine.ncd.com (Ron Guilmette):
>One final note.  The biggest thing that seems to be left unspecified in
>E&S is the whole subject of standard libraries and header files.  Are
>there any?  Are the libraries and header files mandated by the ANSI C
>standard considered a part of "standard" C++?

I would also like to know whether I can include <stdlib.h> with
impunity or if 'extern "C"' is supposed to be required.  I made a
local change to our G++ compiler which assumes that all files in
/usr/include are 'extern "C"', so that I can do a simple #include
<stdlib.h> from C and C++ programs.  I would like to know whether a
C++ must, or even may, legally allow such usage.

I also encourage any X3J16 members to speak up on the current status
of the header file and library issues.
-- 
Chip Salzenberg at Teltronics/TCT     <chip@tct.uucp>, <uunet!pdn!tct!chip>
 "Most of my code is written by myself.  That is why so little gets done."
                 -- Herman "HLLs will never fly" Rubin
Re: Questions on the evolving standard.
#402
Author: Walter Bright
Date: Mon, 20 Aug 1990 18:20
6 lines
777 bytes
In article <26CC1668.5785@tct.uucp> chip@tct.uucp (Chip Salzenberg) writes:
<I would also like to know whether I can include <stdlib.h> with
<impunity or if 'extern "C"' is supposed to be required.

With Zortech C++, all supplied C header files will work equally well with
C and C++ without needing an extern "C" wrapper.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads