
Trip report: Fall ISO C++ standards meeting - matt_d
https://herbsutter.com/2018/11/13/trip-report-fall-iso-c-standards-meeting-san-diego/
======
Someone
[http://www.open-
std.org/jtc1/sc22/wg21/docs/papers/2018/p090...](http://www.open-
std.org/jtc1/sc22/wg21/docs/papers/2018/p0907r4.html#survey), concludes

 _”the only machine the author could find using non-two’s complement are made
by Unisys, and no counter-example was brought by any member of the C++
standards committee. Nowadays Unisys emulates their old architecture using x86
CPUs with attached FPGAs for customers who have legacy applications which
they’ve been unable to migrate. These applications are unlikely to be well
served by modern C++, signed integers are the least of their problem. Post-
modern C++ should focus on serving its existing users well, and incoming users
should be blissfully unaware of integer esoterica.”_

That led to the decision that _”Signed Integers are Two’s Complement”_ in C++
20.

That makes it too easy to write portable code :-)

~~~
reality_czech
"Post-modern" C++? Finally someone admits that the language was all a huge
prank.

~~~
Koshkin
C++ is more like a drug - having used it makes it impossible to go back to C.

~~~
kazinator
It is absolutely possible. I did C++ development as a regular job years ago,
now I'm coding in C (for that type of coding).

What will get you off the C++ drug easily is Lisp.

Once I discovered Lisp, C++ had no place in my "personal spectrum" any more,
but C (including the C-like subset of C++) still did. Well, it wasn't so
sudden, mind you. More like: the more Lisp I knew, the less interest I had in
C++.

(Idiotic lambda implementations and whatnot will not woo me back, sorry.)

~~~
svnpenn
Sorry if this is a hated question - but are all Lisp the same rats nest of
parenthesis?

ive always been interested in Lisp but that is so ugly - i would a
JavaScript/Ruby/Python method chaining to 5 levels of nested parenthesis

~~~
billsix
I implemented a compile-time test framework in Gambit Scheme in 7 lines of
code, and Python's yield in about 20 or so.

[http://billsix.github.io/bug.html#_make_generator](http://billsix.github.io/bug.html#_make_generator)

Lisp code has few wasted moves. Programming in it does require changing your
mindset of syntactic beauty. And once your mindset changes, you can make
whatever syntax you want.

Perhaps the biggest hurdle is that the code is not best read linearly. The
reader must understand the order of evaluation, which follows very simple
rules, in order to understand the code correctly. That hurdle is definitely
worth the jump.

~~~
Ace17
> Perhaps the biggest hurdle is that the code is not best read linearly. The
> reader must understand the order of evaluation, which follows very simple
> rules, in order to understand the code correctly.

Could you please give some details about how the order of evaluation differs
from, say, C? Thanks!

~~~
billsix
They are very similar. They are both applicative-order, meaning that the
arguments to a procedure are evaluated before the procedure is applied.

The evaluation of a lambda results in a function value, which captures the
enclosing scope, but the procedure is not yet applied to anything.

But the main difference that I've seen anecdotally is that imperative
programmers as a whole tend to get confused by nested expressions, or lets
just say they prefer sequential statements over nested expressions. My
assumption is that they don't fully understand the order of evaluation in
their language of choice.

~~~
kazinator
Scheme and C evaluation rules are very similar: in both languages, the order
of evaluation of function arguments is unspecified.

Common Lisp is left to right, so that (list (inc i) (inc i) (inc i)) will
reliably produce (1 2 3) if i starts at zero.

------
fourthark
Looks like switching to regular releases of the standard 10 (!) years ago, and
all the work they put into proposal workflow, has really paid off.

C++ stagnated for a long time, but IMO Boost's metaprogramming reinvigorated
the language and community.

Now they are following through with concepts, metaprograms that can do
everything runtime programs can do, and soon reflection. Wow.

------
KerrickStaley
I'm really exited for the addition of ranges to C++20. Ranges are objects that
contain both a start and an end iterator. So you can simplify the APIs of
functions that take start and end iterators as separate arguments.

~~~
Sharlin
It's been a long journey; the first version of Boost.Range dates back to 2003.
It's been understood for a long time that functions taking iterator pairs
compose very poorly, but as always, the devil is in the details. But compared
to modern composable abstractions such as Rust iterators, the STL paradigm
feels positively archaic.

------
mehrdadn
Does anyone have examples of well-written modern C++ code out there? I used to
consider myself a C++ expert like circa 2011 but it's advanced to so quickly
that it's almost like a foreign language to me... (though I have tried to keep
up a bit... but it's hard without nontrivial examples)

~~~
KerrickStaley
Effective Modern C++ by Scott Meyer is a good tour of new features in the
language. I highly recommend it. It's maybe a little too in-the-weeds in some
parts but you can just skim those.

It only goes up to C++14 but there's not all that much that's new in C++17.
C++20 looks like it's going to be a bigger update, hopefully Scott will come
out with a new revision of Effective C++ to address the changes.

~~~
MetallicCloud
Unfortunately, that's not likely:
[http://scottmeyers.blogspot.com/2015/12/good-to-
go.html](http://scottmeyers.blogspot.com/2015/12/good-to-go.html)

------
stabbles
C++20 must be exciting with ranges, concepts, modules and easier
metaprogramming.

Are there any numbers/graphs on how many proposals are being submitted over
time? I feel like they are exploding.

~~~
th0br0
> This week’s meeting was extraordinary. The pre-meeting mailing had 274
> papers, about twice as many as any previous meeting, and we had 180 people
> attending, making this the largest C++ committee meeting ever.

[https://www.reddit.com/r/cpp/comments/9vwvbz/2018_san_diego_...](https://www.reddit.com/r/cpp/comments/9vwvbz/2018_san_diego_iso_c_committee_trip_report_ranges/)

------
saagarjha
I'm very excited to see Ranges and Concepts being adopted, since this makes
writing and working with templated code that deals with containers much
easier.

------
zamadatix
> at this meeting we decided to target merging Networking into C++ for soon
> post-C++20 (i.e., targeting C++23).

It'll be nearing a decade of "next release" now as it's own TS and near two
decades of proposal since TR2.

Edit: The Reddit trip report lists 23 as optimistic and 26 as the
conservative.

------
adamnemecek
The concept syntax is actually somewhat pleasant. The previous one was such a
monstrosity.

------
grandinj
Is it not time that specifications for additional features for C++ came with a
test-suite? Preferably something shared via git somewhere that people can
contribute to.

Would make bootstrapping some of these new features to a usable level much
quicker.

Speaking as a dev that needs features to span 3 major compilers (clang/gcc/vs)
before I can use them.

~~~
pjmlp
You can buy a ISO C or ISO C++ certification suite.

[http://www.plumhall.com/suites.html](http://www.plumhall.com/suites.html)

[https://www.opengroup.org/testing/testsuites/perenial.htm](https://www.opengroup.org/testing/testsuites/perenial.htm)

[http://modena.us/](http://modena.us/)

[https://peren.com/pages/cppvs_set.htm](https://peren.com/pages/cppvs_set.htm)

Ah just needing the support across 3 major compilers!

I guess you haven't enjoyed the glory days of writing portable C, C++ or
Pascal code during the 1990's.

~~~
grandinj
I work on a codebase (LibreOffice) that has seen those days (and I worked
through them on other projects, but thankfully without needing cross-platform
support).

I note that there is some sharing of test-suites between the different
compiler vendors, certainly they occasionaly run their compilers against some
of each others test.

But a central shared resource that is updated by multiple people to catch edge
cases would be first prize.

(And hopefully, seeded by the proposal authors, to act as a useful starting
point)

------
pfarnsworth
C++ is changing way too fast to be useful anymore. I spent the first 15 years
of my life loving C++ but in the last 8 years or so, the C++ committee has
vastly outpaced its supply lines. I've been out of the language since then and
I might as well learn a new language rather than try to re-understand the
differences between C++ back then and now.

The only people that can keep up are the hobbyists and the language purists.
It's become a circle jerk and that's a shame because they are modernizing
themselves out of existence, in my opinion. No one in real software can keep
up with the biannual changes and it's getting to the point where migrating to
another language like Go or Java is a lot more stable and less risky.

~~~
pjmlp
Then good luck keeping up with those languages as well, which release new
versions every 6 months nowadays.

Programming languages are just like any other software product.

~~~
nikbackm
C seems to be pretty stable at least. Even if it too has a new version in the
works.

~~~
pjmlp
C is mostly confined to UNIX derived OSes and embedded devs that won't change
to anything else even at gun point.

Yet, even C just got ISO C17 this year, even though it was a minor update.

[https://www.iso.org/standard/74528.html](https://www.iso.org/standard/74528.html)

Languages either die or get updated to fulfill their customer requirements.

------
eps
> _So fasten your seat belts, and stay tuned. C++ programming is likely to
> evolve more, and in better ways, in the upcoming 5 years than it already has
> in the past 20._

Yeah, that's the problem isn't?

You do in fact need damn seat belts to cope with all the changes to what used
to be a very predictable and simple to understand language.

~~~
de_watcher
What? C++ has always been one of the rare languages that don't mindlessly add
stuff that drives them into a corner.

~~~
pjmlp
C++ has this fame of being a bloated language, which it kind of is.

However it isn't really that much bigger than Java, .NET + VB/C#/F#, Python,
Ada, Common Lisp,... when one looks at the size of printed language, library
and implementation specifications.

It is just that others are more beginner friendly and most devs forget they
have a pile of features on their own languages as well.

