C++ Logo


Advanced search

Re: [std-proposals] Relocation in C++

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 2 Mar 2022 14:49:37 +0200
On Wed, 2 Mar 2022 at 14:45, Maciej Cencora <m.cencora_at_[hidden]> wrote:
> Maybe it works for you, it certainly doesn't work for everyone, so no,
> it is not a solution.

Well, that makes our lives very easy, considering that there's no
solution that works for everyone,
so we don't need to do anything, ever.

> > I didn't say it does what its name claims, I said it does what it
> > claims to do. It's a well-documented
> > facility that's been there since C++11, it's relatively easy to
> > explain how it works and how to use it,
> > and after such explanations, the complaints about it
> > not-really-moving-right-there tend to not come up,
> > except from language lawyers.
> It is nowhere near 'easy' to explain what it does. Move-semantics is
> topic that always takes most of the time to
> to explain to devs that learn C++11.

I wonder how you explain it, then. Using vector and unique_ptr as
examples seems to make that
explanation quite easy, and it doesn't take all that long.

> > > So what exactly this new fair amount of complexity would be?
> >
> > Well, it's yet another language facility that needs to be learned.
> > That in and of itself if additional complexity.
> Refusing to add a new feature, because every new feature adds
> complexity, is absurd. If we applied this logic to anything, we
> wouldn't have C++11 or even C++ at all.

What logic? Nobody's suggesting such logic. I merely pointed out that
adding language level relocation
has its own complexity, so it's not just a pure win.

Received on 2022-03-02 12:49:48