🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Michael J. Vilot Tue, 21 Aug 1990 01:39
Re: Questions on the evolving standard.
#399
Author: Michael J. Vilot
Date: Tue, 21 Aug 1990 01:39
61 lines
3041 bytes
Ron Guilmette asks:
> When you say `compatibility with THE C LIBRARY' I'm left wondering.

Sorry for the lack of precision.  The ANSI C standard is one of the two
base documents for the ANSI C++ standard.  It contains a Library
specification (Chapter 4).
  Since there's a lot of interest in providing mixed ANSI C/ANSI C++
implementations, that's the library that an ANSI C++ standard must be
``compatible'' with.  I would expect other standards (notably POSIX) to
develop separate `C++ bindings' as interest develops -- it's beyond the
scope of X3J16 to formulate these.

> What about the types for arguments ... ?
> What about error conditions ... ?

These are important questions to answer.  The availability of exceptions in
ANSI C++ (if and when ...) will certainly impact the design considerations
of any library.
  Steve Clamage (steve@taumet.com) and Shawn Nash (nash@s55.prime.com) are
collecting ideas and formulating a proposal for November's meeting which
will address these issues for the ANSI C library.  I'm sure they would
welcome any suggestions you have.
  I'm particularly interested in hearing what chances you think we have of
modifying the ANSI C standard to improve the library's type safety.

> What about groups of functions that operate on particular types ... ?

Your example, which looks a lot like the class `File' from libg++, is one
of the ways an ANSI C++ library could offer a better solution to the set of
facilities provided by the ANSI C library.  Personally, I would like to see
us do something useful and effective along these lines.

However, there is some concern over (needlessly ?) duplicating equivalent
functionality (even for the sake of type safety and user extensibility).
  There is also (apparently) a significant number of people interested in
being able to switch to a C++ compiler and rebuild their existing C code
without any changes to their source files.

  I think this implies that any `extern "C"' linkage specifications will
have to be part of a vendor's set of header files, rather than required to
be part of user code.  That is, I would not expect to see:
	extern "C" {
	#include <stdlib.h>
	}
in users' C++ source files, but rather:
	#ifdef __cplusplus
	extern "C" {
	#endif
	...
	#ifdef __cplusplus
	}
	#endif 
(or something equivalent) in a file `stdlib.h' supplied as part of a
vendor's mixed C/C++ environment.

If this is the preferred approach, I doubt there's much hope of changing
the ANSI library to a significant degree.

--
Mike Vilot,  ObjectWare Inc, Nashua NH
mjv@objects.mv.com  (UUCP:  ...!decvax!zinn!objects!mjv)
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