C++ Logo

std-discussion

Advanced search

Re: On "transparently replaceable" in std::vector operations

From: Hyman Rosen <hyrosen_at_[hidden]>
Date: Tue, 27 Apr 2021 14:57:06 -0400
Yes? Water can wear away stone given enough time.

When someone points out a problem with C++, it's not wrong to say that the
problem exists because the object model is broken, when the problem exists
because the object model is broken. Neither can problems be fixed before
they are acknowledged.

I will repeat what I said years ago when I was arguing about order of
evaluation. A programming language exists so that programmers can direct
the actions of machines. To the extent that the language makes it difficult
to specify what the machine is to do, or makes that expression ambiguous,
especially in ways that are not readily discernable, it is failing in it's
task, and risks destructive behavior in the real world.

And that is not even considering ridiculously gratuitous language
changes/interpretations. For example, it is apparently now the consensus
among the C++ standardizers that it is permissible to elide accesses of
volatile automatic variables.

On Tue, Apr 27, 2021, 2:22 PM Ville Voutilainen <ville.voutilainen_at_[hidden]>
wrote:

> On Tue, 27 Apr 2021 at 21:12, Hyman Rosen <hyrosen_at_[hidden]> wrote:
> >
> > I respectfully believe you are giving me the courtier's reply:
> https://en.wikipedia.org/wiki/Courtier%27s_reply
> >
> > That is, one does not need to be a tailor to proclaim that the emperor
> is naked. Things like bit_cast and launder, the inscrutability of the
> aliasing rules, the questions about the pointer arithmetic used to
> implement vector, all show that something is very wrong with the object
> model.
> >
> > There's is also zero chance that a proposal to model objects as
> memory+type would ever be accepted, because it would do away with many of
> the permissions the current situation gives to compiler writers to optimize
> code (which is also permission to disregard programmer intent).
>
> So, you're playing a broken record, complaining when it's described a
> broken record, and plan to continue to do nothing
> about it but keep playing it?
>

Received on 2021-04-27 13:57:23