[Development] final value classes: some background information and plans

lars.knoll at nokia.com lars.knoll at nokia.com
Wed Mar 7 13:56:07 CET 2012


I very much agree with Andre and Jedrzej. I don't see little value added
here, and I actually even see quite a few useful cases for public
inheritance, like QPolygon.

So no, I'm against making value classes final.

Cheers,
Lars

On 3/7/12 1:03 PM, "ext Jedrzej Nowacki" <jedrzej.nowacki at nokia.com> wrote:

>On Wednesday 7. March 2012 12.37.51 ext Marc Mutz wrote:
>> On Wednesday March 7 2012, andre.poenitz at nokia.com wrote:
>> > Marc Mutz wote:
>> > > I've uploaded a patch series that makes most of the value classes in
>> > > QtCore final in the C++11 sense (ie. under a C++11 compiler, these
>>can
>> > > no longer be inherited from).
>> > 
>> > I disagree with the idea of making Qt core classes non-inheritable.
>> > 
>> > While inheritance from "value" classes is rarely needed, it _is_
>>useful
>> > at times. Most notably, private inheritance is even "pretty safe".
>> > 
>> > There is no need to artificially deprive us of useful tools.
>> 
>> Name one instance where (non-public, since public isn't safe)
>>inheritance
>> is useful and not just laziness on the part of the inheriter :)
>> 
>> Thanks,
>> Marc
>
>What are you trying to solve? Using raw pointers may be unsafe but it
>doesn't mean that the functionality should be removed from C++. I agree
>with Andre blocking inheritance is really radical move, that doesn't buy
>us much apart of SC problems.
>
>Cheers,
>  Jędrek
>_______________________________________________ Development mailing list
>Development at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list