Liste des Groupes | Revenir à cl c++ |
On Sun, 29 Dec 2024 14:51:17 +0100Disclaimer - my work is mostly with long-running projects, and the standard to use is generally set at the start and left unchanged (I have a couple of projects that are still "live" written in C90). So C++17 is the latest C++ version I have used in real work. Additionally, working with small embedded systems means I use a somewhat restricted subset of the language and a very restricted subset of the standard library. So while I try to learn about newer standards, my experience of some features is limited.
David Brown <david.brown@hesbynett.no> wrote:
On 29/12/2024 10:32, Muttley@dastardlyhq.com wrote:Comments after cursory view:On Sat, 28 Dec 2024 16:20:57 +0100>
David Brown <david.brown@hesbynett.no> gabbled:On 28/12/2024 11:19, Muttley@dastardlyhq.com wrote:>Being serious, I haven't even checked whats new in it but going>
by C++ 2020
it'll be yet more syntactic soup to support features absolutely
no one outside
of ivory tower academic discussions asked for. It'll just add yet
morecomplexity to compilers, hence more potential bugs and make
the C++ learning
curve even steeper meaning yet more new programmers abandon it -
or don't
even start - for languages such as Python.
Ah, yes - the classic well-reasoned argument. Why would one ever
want to /look/ at the new standard before condemning it?
Ah yes, the same logic that has produced cars with ever more,
harder to use complexity that no one wants.
No, not remotely. But then, you knew that before making what you
mistakenly thought was a smart or witty reply.
>
If you don't like the complexity of newer C++ standards, that's fine.
If you don't think it is a good direction for the language, fair
enough. You can choose a different language, or stick to an older
standard, or make your own language, or get involved in the C++
standardisation processes and try to influence them.
>
You can have an informed opinion about C++, and agree or disagree
with the opinions of the committee members.
>
But what you don't get to do - or at least, don't get to do if you
want to be viewed seriously - is spout an /uninformed/ opinion.
That's no more than mindless prejudice, and of no interest to anyone.
>
So go away, and read about C++23. Learn what is new or changed.
/Then/ you can come back and tell us what you don't like about it -
or perhaps you'll find some things that you /do/ like about it.
Either way, you'll be at least vaguely qualified to express an
opinion on it.
>
<https://en.wikipedia.org/wiki/C%2B%2B23>
>
C++20 introduces two promising language features - concepts and
coroutines. Both were introduces without proper support in standard
library. Absence of support in library in both cases was justified by
probably correct claim that the best library constructs are still in
research state, non-crystallized. The hope was that universal
availability of this features at compiler level will help to best
library constructs to mature.
In case of coroutines developers were left with choice of 3 options:
1. To write a lot of boiler-plate code each time they a going to use
coroutines.
2. To try to organize repetitive patterns in the library (likely
template library) of their own and reuse it between parts of the
programs and multiple projects. Hopefully, share with community.
Hopefully, under liberal license.
3. Don't use coroutines
In case of concepts, the choice was even narrower:
1. Use concepts when you occasionally are writing container-like or
algorithm-like template of your own.
2. Don't use concepts.
Nobody was realistically expecting that grassroots developers will use
concepts to develop comprehensive widely reusable library that
duplicates functionality of STL, but brings advantage of sane error
messages.
So, where we are 3 years later?
W.r.t. concepts, in the same unfortunate place.
W.r.t. coroutines, library provides std::generator. I didn't look at it
yet. Hopefully, it works. Hopefully it is easy to use. But it is just
one of many possible uses of coroutines, and I would think that
it is not the one that could be considered most common.
Did I miss something?
Les messages affichés proviennent d'usenet.