Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!psuvax1!rutgers!cunixf.cc.columbia.edu!cs.columbia.edu!kearns From: kearns@cs.columbia.edu (Steve Kearns) Newsgroups: comp.lang.c++ Subject: Re: delete [] Keywords: arrays, new&delete Message-ID: <1990Aug6.153136.3427@cs.columbia.edu> Date: 6 Aug 90 15:31:36 GMT References: <641@atcmpe.atcmp.nl> <1990Jul27.231220.8396@cerc.utexas.edu> <4937@pegasus.ATT.COM> <4942@pegasus.ATT.COM> <1568@idunno.Princeton.EDU> <4953@pegasus.ATT.COM> Reply-To: kearns@cs.columbia.edu (Steve Kearns) Followup-To: comp.lang.c++ Organization: Columbia University Department of Computer Science Lines: 13 Re the conflict between "delete [] foo" and "delete foo": The "right" way, of course, is for C++ to support the "Array of" type constructor. While this would require updating lots of existing code (mainly, changing "fooType * f" to "fooType[] * f"), it would eliminate a problem with C: the double role of pointers to objects and pointers to arrays of objects. Of course, any change that requires updating lots of code is unacceptable; but I for one am looking forward to the day when D++ is available, and we can shed all of these C bletcherisms and C++ complexities. -steve