From 1113880304241200591
X-Google-Thread: f78e5,e2cfdf64f67c7793
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: nagle@animats.com (John Nagle)
Newsgroups: comp.std.c++
Subject: Re: Eliminating uninitialised variables
Date: Tue, 21 Sep 2004 13:05:04 GMT
Organization: SBC http://yahoo.sbc.com
Lines: 26
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <FQO3d.21860$bB7.16246@newssvr27.news.prodigy.com>
References: <memo.20040920104138.384A@brangdon.m>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1095771910 29329 158.152.254.254 (21 Sep 2004 13:05:10 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Tue, 21 Sep 2004 13:05:10 +0000 (UTC)
X-Received-SPF: none (mailbox5.ucsd.edu: domain of news@newssvr27-ext.news.prodigy.com does not designate permitted sender hosts)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113
X-Path: comp-std-cpp-robomod!not-for-mail
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i8LD54CG006059;
	Tue, 21 Sep 2004 23:05:04 +1000 (EST)
X-NNTP-Posting-Date: Tue, 21 Sep 2004 01:18:29 EDT
X-Delivered-To: std-c++@ucar.edu
X-Spamscanner: mailbox5.ucsd.edu  (v1.5 Aug 25 2004 09:28:35, -2.8/5.0 3.0.0-rc1)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Accept-Language: en-us, en, ja
X-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=2.64-mulga_r1
X-UserInfo1: F[OQBYCDXJV[S_H]^JKBOW@@YJ_ZTB\MV@BD]\YIJYWZUYICD^RAQBKZQTZTX\_I[^G_KGFNON[ZOE_AZNVO^\XGGNTCIRPIJH[@RQKBXLRZ@CD^HKANYVW@RLGEZEJN@\_WZJBNZYYKVIOR]T]MNMG_Z[YVWSCH_Q[GPC_A@CARQVXDSDA^M]@DRVUM@RBM
X-Spam-Level: 
X-Newsgroups: comp.std.c++
X-MailScanner: PASSED (v1.2.8 57087 i8L5IURm077509 mailbox5.ucsd.edu)
Xref: g2news1.google.com comp.std.c++:2787

    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.

			John Nagle
			Animats

Dave Harris wrote:
> In a comp.lang.c++.moderated thread about const correctness, the issue of 
> uninitialised variables came up.

---
[ 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                       ]



