Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!psuvax1!rutgers!cmcl2!lanl!beta.lanl.gov!scp From: scp@acl.lanl.gov (Stephen C. Pope) Newsgroups: comp.lang.c++ Subject: Re: >this< as a reference Message-ID: Date: 18 Oct 90 19:16:07 GMT References: <11375@life.ai.mit.edu> <58304@microsoft.UUCP> Sender: fxm@lanl.gov Reply-To: scp@acl.lanl.gov Organization: Advanced Computing Lab, LANL, NM Lines: 19 In-reply-to: jimad@microsoft.UUCP's message of 17 Oct 90 17:54:19 GMT on 17 Oct 90 17:54:19 GMT, jimad@microsoft.UUCP (Jim ADCOCK) said: Jim> To my mind, perhaps the saddest legacy left over from "C" days is the Jim> automatic conversion of an array to a pointer to its first member. Thus, Jim> when presented with a Foo*, one doesn't really know if one has access to Jim> an isolated Foo object, the start of an array of Foos, or a pointer into Jim> an array of Foos. To my mind this is a great weakness in the C++ type Jim> system, and leads to much aliasing problems, and compilers having to Jim> pessimize their code. Too late to fix it now, though.... Do check out Doug Lea's submission to the ANSI committee concerning array references. He deals with just this issue, in a manner which enhances the safety of using arrays tremendously. stephen pope advanced computing lab, lanl scp@acl.lanl.gov