From -2950150971077292646
X-Google-Thread: f78e5,e2cfdf64f67c7793
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: comeau@panix.com (Greg Comeau)
Newsgroups: comp.std.c++
Subject: Re: Eliminating uninitialised variables
Date: Wed, 22 Sep 2004 20:29:48 GMT
Organization: Comeau Computing; http://www.comeaucomputing.com
Lines: 35
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <cismjo$5pr$1@panix2.panix.com>
References: <memo.20040920104138.384A@brangdon.m> <FQO3d.21860$bB7.16246@newssvr27.news.prodigy.com> <6x14d.132741$3l3.96020@attbi_s03>
NNTP-Posting-Host: news.news.demon.net
X-Trace: news.demon.co.uk 1095884995 19645 158.152.254.254 (22 Sep 2004 20:29:55 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 22 Sep 2004 20:29:55 +0000 (UTC)
X-Received-SPF: pass (mailbox4.ucsd.edu: domain of comeau@panix.com designates 166.84.1.74 as permitted sender) receiver=mailbox4.ucsd.edu; client_ip=166.84.1.74; envelope-from=comeau@panix.com;
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=2.64-mulga_r1
X-Reply-To: comeau@comeaucomputing.com
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i8MKTm3U016506;
	Thu, 23 Sep 2004 06:29:48 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Delivered-To: std-c++@ucar.edu
X-Spamscanner: mailbox4.ucsd.edu  (v1.5 Aug 25 2004 09:28:35, 0.0/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-Newsgroups: comp.std.c++
X-MailScanner: PASSED (v1.2.8 56639 i8MKGvlp062501 mailbox4.ucsd.edu)
Xref: g2news1.google.com comp.std.c++:2842

In article <6x14d.132741$3l3.96020@attbi_s03>,
Walter <walter@digitalmars.nospamm.com> wrote:
>
>"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.

What does D do if it's also specified on a constructor (or multiple
ones with different values), assuming is has such possibilities?
-- 
Greg Comeau / Comeau C++ 4.3.3, for C++03 core language support
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?

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



