On Thu, May 16, 2019 at 10:00:33AM +1200, Christian Gagneraud wrote:
> On Thu, 16 May 2019 at 09:32, Иван Комиссаров <abba...@gmail.com> wrote:
> > > 15 мая 2019 г., в 19:50, André Pönitz <apoen...@t-online.de> написал(а):
> > >
> > > Getting rid of implicitly shared containers should be a rather obvious 
> > > move
> > > when "performance" is part of any "final picture", coherent or not.
> >
> > +1 from me, hidden detaches are evil =)
> 
> How do you avoid copy then? Without cluttering an API.

API-wise, returning some kind of iterator/span/range is often sufficent,
and even more flexible than a full copy.

I am also not sure how relevant API here is. The only "external" consumer
of QBS API I am aware of is Qt Creator.

Implicit sharing is convenient, and it's even a solution when performance is not
crucial, e.g. classical GUI code. But I wouldn't attach that label to build
systems. Quite a few containers are never copied, yet with implicit sharing one
pays for each access "just in case" the container is copied massively, 
unmodified.

Andre'
_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs

Reply via email to