home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!ark
- From: ark@alice.att.com (Andrew Koenig)
- Newsgroups: comp.lang.c++
- Subject: Re: Renew?
- Message-ID: <23315@alice.att.com>
- Date: 25 Jul 92 18:27:40 GMT
- Article-I.D.: alice.23315
- References: <1992Jul3.171226.10277@taumet.com> <1992Jul3.201320.26801@well.sf.ca.us> <1992Jul4.173316.11890@taumet.com> <1992Jul5.002414.390@frumious.uucp> <THOTH.92Jul25110048@wave.cis.ufl.edu>
- Reply-To: ark@alice.UUCP ()
- Organization: AT&T Bell Laboratories, Liberty Corner NJ
- Lines: 40
-
- In article <THOTH.92Jul25110048@wave.cis.ufl.edu> thoth@wave.cis.ufl.edu (Robert Forsman) writes:
-
- > The absence of an analog for realloc is one of my MAJOR gripes with
- > C++
-
- So make a proposal. I and several other people have thought about
- it from time to time but so far I have not seen a proposal I like.
-
- 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.
-
- > It is. If they're too busy considering other stuff, they can put it
- > on hold. This is more important.
-
- It may be more important to you; it is probably not more important
- to most of the committee members. For example, I do not think anyone
- has actually sent in a proposal for it.
-
- > Well, I'm not sure I like that. I'd much rather see a bcopy instead
- > of a copy construction and a deletion in almost every case (almost).
- > I may have missed the discussion about why this is bad.
-
- If I write a copy constructor in my class, I expect that constructor
- to be called when an object of that class is copied. Period.
-
- > Why not have ANOTHER special method (in addition to copy
- > construction, deletion and assignment) which is only called when an
- > object is being MOVED from one memory location to another?
-
- That is much too much added complexity for one special case. I can
- confidently guarantee that if such a feature were added, the majority
- of C++ programs would either misuse it or forget to use it altogether.
-
- Simple things are hard enough without looking for more ways of
- complicating them.
- --
- --Andrew Koenig
- ark@europa.att.com
-