From 6702316974020895280
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,fc1538f2aa3fc9f8
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1993-01-13 10:30:27 PST
Newsgroups: comp.std.c++
Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Type System
Message-ID: <1993Jan13.182315.23888@ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: extro.ucc.su.oz.au
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
References: <C0Iy9o.9x@frumious.uucp> <1993Jan9.001948.28388@lucid.com> <1993Jan12.214547.20528@microsoft.com>
Date: Wed, 13 Jan 1993 18:23:15 GMT
Lines: 30

In article <1993Jan12.214547.20528@microsoft.com> jimad@microsoft.com (Jim Adcock) writes:
>
>A* pa;
>
>A::A() const
>
>Such a const ctor can only give its members or base parts values via
>the colon section initializers.  Members cannot be changed within the
>body of the constructor.  

	Implies that all the base classes and members ought
to have const constructors too.

>For backwards compatibility, if you don't
>declare a const ctor, then the loophole would be allowed to continue
>in ctors of that class, and in which case members could continue to
>be changed within the body of the ctor.

	Not just for backwards compatibility. For necessity?
Many times I've needed (or thought I needed)
to put things in the body. Example anyone?

(Cant think of one: maybe const constructors are viable.
In which case .. why not make them ALL const :-)

-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------


