From kde-core-devel Fri May 20 08:17:00 2005 From: christian.loose () hamburg ! de Date: Fri, 20 May 2005 08:17:00 +0000 To: kde-core-devel Subject: Re: Re: QUrl in KDE 4 Message-Id: <12432494.1116577020693.JavaMail.meinbereich () kalifornien> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=111657704119815 -----Ursprüngliche Nachricht----- Von: jfirebaugh@kde.org Gesendet: Freitag, 20. Mai 2005 05:08 An: kde-core-devel@kde.org Betreff: Re: QUrl in KDE 4 > On May 19, 2005, at 7:02 PM, Frans Englich wrote: > > As Thiago, I disagree, because with that approach you will find the > > problem in > > any object oriented design; where something is a subset, > > constrainment, of > > something wider -- what class hierarchies usually are about, > > AFAICT. A square > > is a subset of the recangle's value space, so to speak. > [snip] > > Hence, I don't see representation problem Thiago sees. Perhaps an > > elaboration > > can be provided? > > On the contrary, class hierarchies are ill suited to this type of > subset relationship: > [snip] > > Inheriting the other way around doesn't work either. > > See also http://c2.com/cgi/wiki?CircleAndEllipseProblem > > The URL/URI relationship is very similar. One can find another good explanation for this problem in the C++ FAQ Lite. See [21.6] till [21.12]: http://www.parashift.com/c++-faq-lite/proper-inheritance.html#faq-21.6