170. WG21 Feb '24 Mailing, C++ Successors, Reflection, Pattern Matching
An office meeting pretending to be a podcast. With Gianluca Delfino, Frances Buontempo, Dmitry Kuzminov, Jody Hagins et al.
Media
Video
Podcast
Powered by RedCircle
Regarding C++ successor languages
Heard this from a colleague (thanks for the insight Chris S.!): Scala was initially positioned as a "better Java" when Java evolution stagnated. It had lots of syntactic sugar and more features, including FP. Some were very enthusiastic about this and took a risk of adopting Scala. Now, they are finding themselves in a pickle due to slow language evolution and dearth of expertise. In the meantime Java gained many of Scala features, and is more popular than ever.
This reminds me of how C++ successor languages are being positioned now.
Time is a flat circle.
What’s the status on "C++ 2.0" compilers like Circle, Carbon, cpp2 etc? Will Circle ever go open source?
The COVID-19 lockdown period was the Great Era of C++ Successor experimentation. Lockdown is over, and we are all ordered to go back to work. ↑
Compilers need paid people to work on them, open source or not. Nobody is paying me to work on Circle, so I’m pretty certain nobody will pay anyone else to work on it either. I’m burning savings every day that goes by, and I need to prioritize software development, rather than all the other stuff that an open source effort requires–and which won’t advance the project technically at all. ↑
What’s the play here, I don’t get it.
WG21 Mailing, February 2024
Reflection for C++26
CppCast: Reflection for C++26, with Daveed Vandevoorde, EDG
EDG = Edison Design Group
The EDG compiler can impersonate multiple versions of GCC, Clang, or MSVC when analysing code, including all their features and bugs. This sounds terrible if you are an EDG compiler developer.
The new syntactical construct [:foo:]
is called splicer. David says, "all the good delimiters were taken, and reflexpr looked heavy."
For the opposite construct they went with the caret operator ^
because it illustrates the lift operation.
Writing [:^int:]
is the same as writing int
.
Pattern Matching: match Expression
P2688R1 by Michael Park.
std::optional<T&>
P2988R3 by Steve Downey and Peter Sommerlad.
Assignment to std::optional<T&>
means re-sitting of the optional, NOT assignment-through.
Principled Design for WG21
P3004R0 by John Lakos et al., Bloomberg (65 pages).
This paper presents a formal, systematic, individual- and group-friendly design selection and/or refinement methodology called principled design. We offer several examples of using this principled-design process to evaluate proposed solutions using relevant, characterized, and ordered principles that represent design criteria and to compare each criterion to each solution. By scoring each solution against each principle in turn, we can quickly elucidate which solutions are nonviable, ultimately guiding us to consensus and an optimal resolution.
- This paper is so meta I can’t even.
- Adding a level of indirection on top of the existing WG21 process: there should be an app for that.
- Vik never gets to choose another team outing ever again.
indirect and polymorphic: Vocabulary Types for Composite Class Design
P3019R6 by Jonathan Coe, Antony Peacock, and Sean Parent.
The class template
indirect
confers value-like semantics on a free-store-allocated object. Anindirect
may hold an object of a classT
. Copying the indirect will copy the objectT
. When anindirect<T>
is accessed through aconst
access path, constness will propagate to the owned object.The class template
polymorphic
confers value-like semantics on a dynamically-allocated object. Apolymorphic<T>
may hold an object of a class publicly derived fromT
. Copying thepolymorphic<T>
will copy the object of the derived type. When apolymorphic<T>
is accessed through aconst
access path, constness will propagate to the owned object.
Quantities and units library
P3045R0 by Mateusz Pusz et al.
std::basic_fixed_string
P3094R0 by Mateusz Pusz.
This paper proposes standardizing a string type that could be used at compile-time as a non-type template parameter (NTTP).
Allowing exception throwing in constant-evaluation
P3068R0 by Hana Dusíková.
std::execution Introduction
P3090R0 by Inbal Levi and Eric Niebler.
This paper aims to provide a high-level introduction to the design of P2300 and its guiding principles.
A plan for std::execution for C++26
C++ Asynchronous Parallel Algorithms
P3300R0 by Bryce Adelstein Lelbach.
Graph Library
By Phil Ratzloff and Andrew Lumsdaine.
Refining Contract Violation Enumerations
P3102R0 by Joshua Berne.
Printing Blank Lines with println
P3142R0 by Alan Talbot.
Quote
https://infosec.exchange/@0xabad1dea/111810652448906201
a significant part of my job is telling the customer that their code contains undefined behavior that could explode in their faces on next compiler upgrade, to which the response, invariably, is that they are still using the exact same build of gcc as the day the company was founded in 2007, and they will bury that exact binary of gcc with them in their grave.