On 23/04/2024 17:25, Ross Finlayson wrote:
On 04/23/2024 12:54 AM, David Brown wrote:
On 23/04/2024 04:18, Ross Finlayson wrote:
On 04/22/2024 07:59 AM, Stefan Ram wrote:
How many of you have read through the C++ spec, like, all the
way through?
Have you guys checked out the latest version of the C++ spec yet? >>>>
I was just browsing around and I stumbled upon this little
guide in the WHATWG HTML spec on how to properly read through
these kinds of technical specifications!
|1.9.1 How to read this specification
|
|This specification should be read like all other
|specifications. First, it should be read cover-to-cover,
|multiple times. Then, it should be read backwards at least
|once. Then it should be read by picking random sections from
|the contents list and following all the crossreferences.
|
HTML Living Standard - Last Updated 9 April 2024
A much better choice than reading the C++ standards, for most purposes,
is the web site <https://en.cppreference.com/w/>. It is strongly
associated with the ISO working group for C++, and about as close to an
official reference site for C and C++ (core languages and standard
libraries) as you can get. But it is organised as a reference site, not
as a standards document. The site is not a C++ tutorial or something to
read from start to finish, but it is the best place to look things up.
That's great.
I got a lot out of reading "the book", Stroustrup's, then
it reminds me of Harbison and Steele C/C++, and Schildt, the
"Effective C++", some good code with smart pointers,
the I/O streams book or Langer and Kreft, bunch of
Win32 then into COM/DCOM if because, then sort of
about m4 and C/C++ then getting into when .h went to .hpp
then there's much to learn about copy and move and the
in-place and a bunch of sorts great things.
(I'm still sort of learning C99 and C++ 98.)
Don't bother. That's like saying you want to learn to drive a car, but
are still getting the hang of a horse and cart.
The current C standard is C17, which is just a minor tweak on C11. If
you want to learn C, target C11 - it turned C into a language with
support for multiple threads. Most of the language is the same as C99,
however. (C23 is not yet officially published, AFAIK, even though it
can be considered functionally complete. Compiler support is not
finished yet.)
For C++, things changed so dramatically with C++11 that it is often
considered a new language, and there have been significant improvments
in the language since then. Well-written modern C++ looks as different
from C++98 as it does from C. If you are looking for some kind of
tutorial book, make sure it is based on at least C++17 (and by "based
on", I mean that's the language taught in the book - not just a "What's
new in C++17" appendix add-on).
When cppreference arrived it was a great thing,
cross-referenced hyper-linked language, library,
and language level coverage.
I don't know why you are writing in the past tense - yes, the
cppreference website was a great resource when it was first published.
It is /still/ a great resource, and I don't know of any that is better
as a reference site. You make it sound like this is no longer the case.
I derived value and some entertainment from
Stroustrup's and Sutter's C++ guidelines,
moreso than the Google C++ guidelines.
These are all good resources. Different people have different
requirements and preferences, and so will like different sets of guidelines.
These days it does look like C++ 11 would be about
the way of things, for somebody last familiar with
"MSVC6 SP3/SP6", though it was great for the Windows
side when they released a C++ compiler, to complement
things like Djgpp, Mingw64, Navia's lcc, and these
kinds of things, vis-a-vis Borland, about a world
where gcc/g++/gpp is a great thing.
I'm sorry, I have very little idea what you are trying to say here. It
looks like you are saying that you were happy when MS first made a C++ compiler, and therefore you want to learn an old version of C++. But I
presume I misunderstood, since that would be an irrational argument.
C++11 was the /beginning/ of the new C++ language. It has got better
since then, in many ways. Many things that were hard to write in older
C++ have got progressively easier with new versions. For example, you
can pretty much forget SFINAE and enable_if<>, and their associated incomprehensible error messages - use concepts in C++20.
There are still bits to come. Contracts will be the big step in C++26. Metaclasses and reflection will, I hope, make it into C++ in the future,
and hopefully also zero-overhead exceptions.
The disadvantage of backwards compatibility is that new features come in addition to existing ones, making the language bigger, but for your own
code you can concentrate on using new and better techniques. (That does
not mean you have to like or use /everything/ in newer standards!)
If you are learning a new language, and don't need to do so specifically
to support old code, then it makes sense to learn the /current/ language
and look forward to what's coming - not to learn outdated versions and
look backwards.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)