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

2012-03-08 Thread Alex Strickland
On 2012/03/07 06:19 PM, Thiago Macieira wrote: > So, tell me. Why would you write? > > int *i = new int(42); Because all fundamental questions can be solved by one more level of indirection? Oh, it's the answer :) Thanks very much for the explanation. -- Regards Alex

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

2012-03-07 Thread lars.knoll
On 3/7/12 8:18 PM, "ext Marc Mutz" wrote: >Hi Lars, > >On Wednesday March 7 2012, lars.kn...@nokia.com wrote: >> 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. > >Thanks f

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

2012-03-07 Thread Marc Mutz
Hi Lars, On Wednesday March 7 2012, lars.kn...@nokia.com wrote: > 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. Thanks for bringing up QPolygon, because I don't think good

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

2012-03-07 Thread Oswald Buddenhagen
On Wed, Mar 07, 2012 at 08:57:03AM +0100, ext Marc Mutz wrote: > 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). > -1 > Value classes are meant to be be used as-is. When

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

2012-03-07 Thread Thiago Macieira
On quarta-feira, 7 de março de 2012 17.17.47, Alex Strickland wrote: > On 2012/03/07 03:25 PM, Marc Mutz wrote: > > You shouldn't look at the Qt-project developers when discussing > > interfaces. > > You should look a the Qt programmers in the trenches that happily write > > QColor * c = new QColor

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

2012-03-07 Thread Alex Strickland
On 2012/03/07 03:25 PM, Marc Mutz wrote: > You shouldn't look at the Qt-project developers when discussing interfaces. > You should look a the Qt programmers in the trenches that happily write > QColor * c = new QColor(...), as blissfully ignorant of the resource leak as > they are of Sutter/Alexa

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

2012-03-07 Thread lars.knoll
On 3/7/12 2:25 PM, "ext Marc Mutz" wrote: >On Wednesday March 7 2012, Jedrzej Nowacki wrote: >> What are you trying to solve? > >I'm trying to prevent that people with a Java mind from running into the >C++ >trap that inheriting from a base class with a public non-virtual >destructor >may invok

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

2012-03-07 Thread Marc Mutz
On Wednesday March 7 2012, Jedrzej Nowacki wrote: > What are you trying to solve? I'm trying to prevent that people with a Java mind from running into the C++ trap that inheriting from a base class with a public non-virtual destructor may invoke undefined behaviour. Looking at the number of "add

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

2012-03-07 Thread lars.knoll
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" wrote: >On Wednesday 7. Ma

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

2012-03-07 Thread Jedrzej Nowacki
On Wednesday 7. March 2012 12.37.51 ext Marc Mutz wrote: > On Wednesday March 7 2012, andre.poen...@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 l

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

2012-03-07 Thread andre.poenitz
> Marc Mutz [marc.m...@kdab.com] > > 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 classe

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

2012-03-07 Thread Marc Mutz
On Wednesday March 7 2012, andre.poen...@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

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

2012-03-07 Thread andre.poenitz
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" clas

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

2012-03-07 Thread Marc Mutz
Hi, 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). The changesets, for reference, are http://codereview.qt-project.org/19008 thu http://codereview.qt-project.org/19024