[Development] qsizetype and classes working with QStrings or QList

Ville Voutilainen ville.voutilainen at gmail.com
Mon Aug 24 13:45:19 CEST 2020


On Mon, 24 Aug 2020 at 12:17, Mathias Hasselmann
<mathias at taschenorakel.de> wrote:
> >> C++ also has a solution for that problem:  https://herbsutter.com/2013/08/12/gotw-94-solution-aaa-style-almost-always-auto/
> > That non-solution is terrible. The very reason for not using deduced
> > types is to detect API breaks loudly.
> > The warning does that in dulcet tones, not as loudly as some might
> > wish because the conversion is implicit.
> > Buying the AAA snake oil can move the problem elsewhere for a while,
> > but it's not helpful; it's partially
> > hiding an API break, and it's unlikely that you want that to continue;
> > the manifestations of the API break
> > are going to appear further away from the spots where they could be
> > first detected.
>
> Do you have examples showing verifiable evidence, or do you share a feeling?

I don't have verifiable evidence examples, but the gist of it is this:

ConcreteType x = foo(); // this detects API breaks right here, right now
...
...
...
some_use_of(x);

With AAA, this might become

auto x = foo(); // this always compiles
...
...
...
some_use_of(x); // you may detect an API break here, or somewhere deep
inside some_use_of

I wonder where the verifiable evidence is that AAA works at scale.


More information about the Development mailing list