home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mole-end!mat
- From: mat@mole-end.matawan.nj.us
- Subject: Re: Covariant Types in Derived Classes
- Message-ID: <1992Aug20.093837.29665@mole-end.matawan.nj.us>
- Summary: They are thinking about it ...
- Organization: :
- References: <1992Aug13.162956.10279@mole-end.matawan.nj.us> <714193217snx@trmphrst.demon.co.uk>
- Date: Thu, 20 Aug 1992 09:38:37 GMT
- Lines: 32
-
- In article <714193217snx@trmphrst.demon.co.uk>, nikki@trmphrst.demon.co.uk (Nikki Locke) writes:
- > In article <1992Aug13.162956.10279@mole-end.matawan.nj.us> mat@mole-end.matawan.nj.us writes:
- > > In article <713504630snx@trmphrst.demon.co.uk>, nikki@trmphrst.demon.co.uk (Nikki Locke) writes:
-
- > > Why do you want a warning? You asked for it explicitly and it lies
- > > within the type system. ...
-
- > You are quite right. In this case, it is legal to write
- > x = z; // Give me a warning please
- > x = (int)z; // I really mean it, don't warn me
-
- > However, there are many cases where the cast syntax is _necessary_ ... To
- > have the compiler accept all such casts without warning (because cast means
- > "I really mean it") is unfortunate - I might have typed the wrong thing.
-
- > I think what I am asking for is some kind of language syntax which
- > distinguishes between casts which I expect to be safe [conversions] (so I
- > hope the compiler will warn me if they aren't), and those which I know
- > aren't safe [coercions] (but I want to do it anyway, ...
-
- > What does the team think ?
-
- This is your lucky day! (Well, OK, it's coming in '94 or '95 ...) The
- issue arose in Toronto as a side-effect of RTTI. Look for a possible
- solution in the RTTI stuff that will make it into the literature in the
- fall. (Notice, I'm not promising that there will *be* one; I'm just
- telling you to *look* for it ...)
- --
- (This man's opinions are his own.)
- From mole-end Mark Terribile
-
- mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
-