[Development] QList

Thiago Macieira thiago.macieira at intel.com
Fri Mar 24 16:34:17 CET 2017


Em sexta-feira, 24 de março de 2017, às 01:34:18 PDT, Marc Mutz escreveu:
> I listed _the_ three use-cases where inheritance is the tool of choice:
> 
> 1. modelling is-a
> 2. inheriting to reuse
> 3. reimplementing virtual functions
> 
> If your use-case is not one of the three, then inheritance is not the right
> tool.
> 
> Clearly, by now, it's neither (1) nor (3). So if anything, it needs to be
> (2).
> 
> And I'm arguing that it's not (2), either, because you can only re-use a
> subset of QStringView API, and need to wrap the other half anyway. (2) is
> really only interesting for pure OO languages with no concept of free
> functions. In C++, we have free functions.

Marc, philosophical question then:

Are you of the opinion that private inheritance has no purpose and should 
never be used?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list