From -3168139135064756205
X-Google-Thread: f78e5,e2cfdf64f67c7793
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: walter@digitalmars.nospamm.com ("Walter")
Newsgroups: comp.std.c++
Subject: Re: Eliminating uninitialised variables
Date: Wed, 22 Sep 2004 17:15:45 GMT
Organization: Comcast Online
Lines: 25
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <6x14d.132741$3l3.96020@attbi_s03>
References: <memo.20040920104138.384A@brangdon.m> <FQO3d.21860$bB7.16246@newssvr27.news.prodigy.com>
NNTP-Posting-Host: news.news.demon.net
X-Trace: news.demon.co.uk 1095873348 29288 158.152.254.254 (22 Sep 2004 17:15:48 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 22 Sep 2004 17:15:48 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Priority: 3
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,PRIORITY_NO_NAME 
	autolearn=no version=2.64-mulga_r1
X-MSMail-Priority: Normal
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i8MHFjvC014545;
	Thu, 23 Sep 2004 03:15:45 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-NNTP-Posting-Date: Tue, 21 Sep 2004 22:01:38 GMT
X-Spam-Level: 
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-Newsgroups: comp.std.c++
Path: g2news1.google.com!news2.google.com!proxad.net!news.cs.univ-paris8.fr!news.zanker.org!news.amigo.co.uk!news.clara.net!wagner.news.clara.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
Xref: g2news1.google.com comp.std.c++:2830


"John Nagle" <nagle@animats.com> wrote in message
news:FQO3d.21860$bB7.16246@newssvr27.news.prodigy.com...
>     I'd suggest allowing initial values within class
> declarations, as in
>
> class T {
> char* p = 0;
> };
>
>     Yes, you can do the same thing in each constructor's
> initialization section.  But it's not as obvious by
> examination when someone left out an initialization,
> because the initialization and declaration are at
> different places.

This is the approach D takes. It makes sense to put the default value where
the declaration is, not off somewhere else.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



