Re: [Interest] Qt ownership model

2016-06-07 Thread Bernhard Lindner
> > All those class names and function names with capital letters don't line > > up with the standard library, so the argument is not accepted. > > And that's why I /love/ Qt so much and would choose it anytime again over an > API that_looks &*like_this(); +1 -- Regards, Bernhard

Re: [Interest] Qt ownership model

2016-06-07 Thread Till Oliver Knoll
> Am 05.06.2016 um 14:49 schrieb Thiago Macieira : > >> Em sábado, 4 de junho de 2016, às 15:55:47 BRT, Антон Жилин escreveu: >> 3. Widgets without a parent are usually used with QSharedPointer: >> auto obj = QSharedPointer::create(...); >> -- Not so great, it is

Re: [Interest] Qt ownership model

2016-06-05 Thread Thiago Macieira
Em sábado, 4 de junho de 2016, às 15:55:47 BRT, Антон Жилин escreveu: > 3. Widgets without a parent are usually used with QSharedPointer: > auto obj = QSharedPointer::create(...); > -- Not so great, it is verbose and does not line up with standard library All those class names and function names

Re: [Interest] Qt ownership model

2016-06-04 Thread André Pönitz
On Sat, Jun 04, 2016 at 08:13:40PM +0300, Антон Жилин wrote: > The aim of these suggestions is not to change how memory management works > in Qt, but to wrap it in a uniform syntax, and by the way, eliminate the > need for explicit usage of `new`. > We need to view each case of memory allocation

Re: [Interest] Qt ownership model

2016-06-04 Thread Антон Жилин
The aim of these suggestions is not to change how memory management works in Qt, but to wrap it in a uniform syntax, and by the way, eliminate the need for explicit usage of `new`. We need to view each case of memory allocation that is used somewhere in Qt and think about how to express it in this

Re: [Interest] Qt ownership model

2016-06-04 Thread Nye
On Sat, Jun 4, 2016 at 6:48 PM, Konstantin Tokarev wrote: > > 04.06.2016, 18:10, "charleyb123 ." : > > This is to free the developer from considering implications of (2). > > I disagree, (2) is still present as the choice of make-function. It's up > to

Re: [Interest] Qt ownership model

2016-06-04 Thread Konstantin Tokarev
04.06.2016, 18:10, "charleyb123 ." : > I won't be active in this thread, because IMHO this is the stuff of legends:   > We are about to usher in a new decade of flame wars for all of C++ with this > topic (and these wars are underway in other C++ communities outside Qt).

Re: [Interest] Qt ownership model

2016-06-04 Thread charleyb123 .
I won't be active in this thread, because IMHO this is the stuff of legends: We are about to usher in a new decade of flame wars for all of C++ with this topic (and these wars are underway in other C++ communities outside Qt). However, I want to chime-in here for Qt, and then I'll not be active

Re: [Interest] Qt ownership model

2016-06-04 Thread Nye
Hello, Since this is opinion based I will give my opinion without explicitly stating it's just a personal view on the subject on every line. On Sat, Jun 4, 2016 at 3:55 PM, Антон Жилин wrote: > A trend in modern C++ is AAA idiom. > The newest and hottest fad, which I

[Interest] Qt ownership model

2016-06-04 Thread Антон Жилин
A trend in modern C++ is AAA idiom. It requires all constructions to be of the following form: auto x = initial_value; A major component in this requirement is that most heap allocations should have the following form: auto x = make_function(constructorArguments); See std::make_unique,