On Friday, March 27, 2020 at 10:58:56 AM UTC-4, Öö Tiib wrote:
> On Friday, 27 March 2020 13:22:19 UTC+2, David Brown wrote:
> > On 27/03/2020 09:03, Öö Tiib wrote:
...
> > > Yes, like I did read the paper where they deprecated constexpr detection
> > > compile time.
> >
> > That must be a different paper. I could not find a reference to
> > anything relevant in a quick search.
> >
> > > It is typical programmer does not know what programmer is
> > > doing lie following with taking away the essential tool.
> >
> > As I couldn't find a paper on "deprecated constexpr detection", I can't
> > comment on it. But AFAICS the "deprecate volatile" paper stands on its
> > own - and should be judged on its own. It makes no sense to me to say
> > it must be a bad thing to deprecate complex volatile uses just because
> > you didn't like a paper on deprecating constexpr detection.
>
> Paper is that removal of deprecated legacy exception specifications.
> <
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html>
What does that have to do with "deprecating constexpr detection [at]
compile time"? There are seven occurrences of "constexpr" in that paper
- none of them involve making it deprecated. Also, what connection do
you see between this paper and "volatile". There's only one occurrence
of "volatile" in that paper, and it doesn't seem to have anything to do
with what you're complaining about.
As david said, how could something that meets the requirements to be
described as a "constant expression" be also "potentially throwing"?
> Typical work of wormtongues.
Removing redundant specification is the "work of wormtongues"? In that
case, maybe we need more of them on the committee.
...
> > Simple volatile usage is almost invariably compiled correctly, so that
> > the object code does exactly what the programmer expected. Complex
> > cases are riddled with compiler bugs, programmer confusion and
> > misunderstanding, underspecification in the standards, and alternative
> > implementations that are each arguably correct. The change in C++20 has
> > nothing to do with the C++17 library - it is nothing more nor less than
> > an admission that complex volatile usage is ripe with errors,
> > unnecessary in practice, and thus should be removed from the language.
>
> Yes, and so we should use assembler to write device drivers.
Can you give a specific example of code that used to be permitted, which
will now be deprecated,as a result of which we'll be forced to use
assembler instead?
...
> > > Popular votes in this world have left me always indifferent. And those
Keep in mind that this isn't a simple popularity contest. These are
votes of experts serving on the C++ committee. These are people who
either implement C++ or use it (roughly equal numbers of each); either
way, they are sufficiently interested in C++ to volunteer to spend
their free time (unpaid) to work to make it better. Why would such want
to destroy C++? They might destroy it unintentionally, but why would
they do it deliberately, as you claim?
...
> > You really think the C++ standards groups are /deliberately/ and
> > /knowingly/ sabotaging the language for its use in low-level
> > programming? That is real tin-foil hat stuff.
>
> What else explanation there is? Useless tool is useless tool.
> Who made it useless weren't morons, so they made it specially.
One alternative explanation is that you do as bad a job of reading
English as you do of writing it (which seems quite plausible), and as a
result you've misunderstood something about the paper you're complaining
about, that made you incorrectly think a useful tool was actually
useless. If you could provide a simple example of code that you think
would become deprecated if that paper is approved, that would go a long
way toward figuring out what you've misunderstood (if you're wrong), or
what we've misunderstood (if you're right).
...
> > All you have to do is make sure your volatile accesses are simple and
> > explicit.
> >
> > If you think your current code is deprecated by the new standard, please
> > show a small example. If I am wrong here, I would like to know about it!
>
> Basically I can not imagine how to write any device driver in C++ without
> volatile member functions nor operators. Say VGA compatible text mode
Please give a specific example of a volatile member function or operator
that you think is deprecated by that paper.
...
> Basically we have to use old stinky C macros that reinterpret cast
> constant uint values to volatile pointer values on every step and
> then do arithmetic with those in large blob functions.
Please provide an example of currently permitted C++ code that would
have to be replaced by such C macros if that paper is approved.
Note: if you do provide an example, I expect the immediate response will
be "Why in the world do you think such code will be deprecated by that
paper?". Therefore, it would save everyone some time if you would
accompany each example with a citation of the specific words from that
paper which left you with the impression that it would deprecate that
example.