From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-25 17:44:59
----- Original Message -----
From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
Sent: Sunday, November 25, 2001 5:04 PM
Subject: Re: [boost] Re: A couple of issues in submitting typelists to boost
> From: "David Abrahams" <david.abrahams_at_[hidden]>
> > From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
> > > That's exactly the argument that MC++D makes in favor of the name
> > > SUPERSUBCLASS in favor of anything else. You can't get it wrong.
> > Huh? SUBSUPERCLASS makes about as much sense to me... which is to say
> > it makes no sense to me. I would prefer a name using the word "derived",
> > whose meaning is hard to mistake.
> "Superclass" and "subclass" are two quite accepted names both in OOP
> and practice.
Yes, but they have fallen out of favor in the C++ world. And somehow, they
manage to confuse John Maddock.
> Anyhow, that's not the point. The idea is that the order of the two
> appears in the name. In super_subclass you know that the superclass is
> and subclass is second. In sub_superclass you would know that the subclass
> appears first and the superclass appears second. A name such as
> would be just as good.
Maybe better (it's shorter).
> But a name such as "subclass" or "derived" would not make clear which
> is first and which is second.
Ah, OK; now I see the logic. We really need compile-time infix operators,
don't we? ;-)
<X is_derived_from Y>::value
Anyway, if this stuff really detects public inheritance, maybe the best
thing to do is try to name the relationship. Perhaps downcastable<b,d>,
is_downcast<b,d> or conversely is_upcast<d,b> would work better?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk