Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!bionet!agate!ucbvax!dog.ee.lbl.gov!pasteur!galileo.berkeley.edu!jbuck From: jbuck@galileo.berkeley.edu (Joe Buck) Newsgroups: comp.lang.c++ Subject: Re: Why no renew Message-ID: <12194@pasteur.Berkeley.EDU> Date: 21 Mar 91 01:47:27 GMT References: <281@nazgul.UUCP> <1991Mar14.042611.14921@mathcs.sjsu.edu> <184@heurikon.heurikon.com> <1991Mar16.172814.6525@mathcs.sjsu.edu> Sender: news@pasteur.Berkeley.EDU Reply-To: jbuck@galileo.berkeley.edu (Joe Buck) Lines: 25 In article <1991Mar16.172814.6525@mathcs.sjsu.edu>, horstman@mathcs.sjsu.edu (Cay Horstmann) writes: |> In article <184@heurikon.heurikon.com> daves@ex.heurikon.com (Dave Scidmore) writes: |> > 1) Zeroing is infrequently needed and seldom even helpful. |> |> Huh? When you say X** a = new X*[100], isn't it most likely that you want |> all those X*'s to be null pointers? What about when you say void func() { X* arrayOfPointers[100]; ... } Wouldn't you want the pointers to be initialized in this case as well? What you're really proposing sounds like specifying a default constructor for non-class types (i.e. pointers get 0, doubles get 0.0, chars get '\0', etc). This has some advantages, but I would hope there'd be a way of turning it off for cases where it's wasteful. -- Joe Buck jbuck@galileo.berkeley.edu {uunet,ucbvax}!galileo.berkeley.edu!jbuck