home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11610 < prev    next >
Encoding:
Text File  |  1992-07-27  |  2.1 KB  |  50 lines

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