home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11523 comp.std.c++:952
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!mole-end!mat
- From: mat@uunet.uu.net!mole-end
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <1992Jul25.072522.4316@uunet.uu.net!mole-end>
- Summary: A union of X, Y, and Z is neither an X nor a Y nor a Z
- Organization: :
- References: <1992Jul21.094204.20100@mole-end> <1992Jul24.142452.756@ucc.su.OZ.AU>
- Date: Sat, 25 Jul 1992 07:25:22 GMT
- Lines: 48
-
- In article <1992Jul24.142452.756@ucc.su.OZ.AU>, maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- > In article <1992Jul23.183041.147@uunet.uu.net!mole-end> mat@uunet.uu.net!mole-end writes:
- > >In article <1992Jul22.150330.6160@cadsun.corp.mot.com>, shang@corp.mot.com (David (Lujun) Shang) writes:
- > >> In article <1992Jul21.094204.20100@mole-end> mat@mole-end writes:
-
- [much STUFF omitted]
-
- > >But without virtualization (polymorphic behavior) derivation is effectively
- > >useless. There is no reason to code inheritance without providing for
- > >virtualization. Then the case which you mention is of no use unless and
- > >until it is provided with RTTI; providing RTTI for it using reasonable
- > >and economical mechanisms would violate certain assumptions that C++ allows
- > >its users to make (C struct compatability).
-
- > But I would make that argument backwards.
-
- > One often wants het. aggregates of unrelated types.
- > Actually, these are aggregates of the *same* type,
- > namely, the union of the unrelated types.
-
- No, they are aggregates of objects which share some common property
- represented by some base type.
-
- A union of three types, related or unrelated, is not any of those types.
- It is something else.
-
- > On the otherhand, polymorphism is the mechanism by which
- > the derived type NEED NOT BE KNOWN. Indeed, if we are to preserve
- > the open/closed principle, MUST NOT BE KNOWN.
-
- Not so, since the current RTTI proposal would not look past private
- derivation.
-
- > So you (well, X3) is considering using RTTI in
- > precisely the case it is not needed, and not supplying it
- > when it actually could be useful :-)
-
- You are offering a type system error (union of A, B, and C as either
- an A or a B or a C) instead of using the type system to support the
- commonality deliberately programmed into the types.
-
- (Anyone got a good intro to either classical or modern category theory?
- And I don't mean the mathematical muddle on morphisms ...)
- --
- (This man's opinions are his own.)
- From mole-end Mark Terribile
-
- uunet!mole-end!mat, Somewhere in Matawan, NJ
-