home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: Renew?
- Message-ID: <1992Jul27.173054.396@taumet.com>
- Organization: TauMetric Corporation
- References: <1992Jul5.002414.390@frumious.uucp> <THOTH.92Jul25110048@wave.cis.ufl.edu> <23315@alice.att.com> <1992Jul25.151227.8156@hemlock.cray.com>
- Date: Mon, 27 Jul 1992 17:30:54 GMT
- Lines: 39
-
- de@cray.com (Duane Eitzen) writes:
-
- >>There is also the problem that it is potentially very difficult to
- >>implement in a C-based environment if it is required to use realloc.
- >>The trouble is that you can't tell whether realloc will move something
- >>until after it's too late.
-
- >To restate the problem: if your C++ is actually just a C++ to C translator,
- >you can't use realloc() in your implementation of renew.
-
- This seems completely irrelevent to me. No matter whether you use C
- as an intermediate language, a 'renew' operator cannot be defined in
- the language specification in terms of realloc.
-
- There is no requirement that 'new', for example, have any relationship
- whatever to 'malloc' or 'realloc'. Either might be implemented in
- terms of the other, or they might be independent implementations. They
- might even manage different address spaces. You therefore could not
- specify the semantics of renew in terms of realloc.
-
- Implementation is a different question. The implementor(s) of the C
- and and C++ runtime libraries must follow the language/library
- specifications. In a given implementation it might be possible to
- use realloc in implementing renew; in another it might not. This
- would depend on the specification of renew and on the implementation
- of realloc. Since we don't have a specification for renew, we can't
- really say much more than that.
-
- >On the topic of submitting a proposal: how does one do this? How
- >much time should one expect to spend doing it? What percentage of
- >external proposals are successful?
-
- These questions are answered in the article "How to Write a C++
- Language Extension Proposal", printed in C++ Report for May 1992,
- and in ACM SigPLAN Notices for June 1992.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
- Vice Chair, ANSI C++ Committee, X3J16
-