Live data from Hacker News

C++26 is done: ISO C++ standards meeting Trip Report

herbsutter.com

31–40 of 437 posts

Re: C++26 is done: ISO C++ standards meeting Trip Report

#32
> Second, conforming compiler and standard library implementations are coming quickly. Throughout the development of C++26, at any given point both GCC and Clang had already implemented two-thirds of C++26 features. Today, GCC already has reflection and contracts merged in trunk, awaiting release.

How far is Clang on reflection and contracts?

Re: C++26 is done: ISO C++ standards meeting Trip Report

#34

Biggest open question is whether the small changes to the module system in this standard will actually lead to more widespread adoption

No. Modules are a failed idea. Really really hard for me to see them becoming mainstream at this point.

Can you explain why you think modules are a failed idea? Because not that many use them right now?

Personally I use them in new projects using XMake and it just works.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#35
post #7

Earlier quoted context omitted.

The best thing the C++ WG could do is to spend an entire release cycle working on modules and packaging. It's nice to have new features, but what is really killing C++ is Cargo. I don't think a new generation of developers are going to be inspired to learn a language where you can't simply `cargo add` whatever you need and instead have to go through hell to use a dependency.

In my experience, no one does build systems right; Cargo included. The standard was initially meant to standardize existing practice. There is no good existing practice. Very large institutions depending heavily on C++ systematically fail to manage the build properly despite large amounts of third party licenses and dedicated build teams. With AI, how you build and integrate together fragmented code bases is even mor…

Speedy convenience beats absolute correctness anyday. Humans are not immortal and have finite amount of time for life and work. If convenience didn't matter, we would all still be coding in assembly or toggling hardware switches.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#37

I look forwards to getting to make use of this in 2040! Proper reflection is exciting.

GCC has it marked as 'RESOLVED FIXED' as of about a week and a half ago. So, it's coming. Also, useful: https://gcc.gnu.org/projects/cxx-status.html

Support in GCC isn't what limits my usage of latest C++ at work.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#38
post #11

I am somewhat dismayed that contracts were accepted. It feels like piling on ever more complexity to a language which has already surpassed its complexity budget, and given that the feature comes with its own set of footguns I'm not sure that it is justified. Here's a quote from Bjarne, > So go back about one year, and we could vote about it before it got into the standard, and some of us voted no. Now we have a much…

Without a significant amount of needed context that quote just sounds like some awkward rambling.

Also almost every feature added to C++ adds a great deal of complexity, everything from modules, concepts, ranges, coroutines... I mean it's been 6 years since these have been standardized and all the main compilers still have major issues in terms of bugs and quality of implementation issues.

I can hardly think of any major feature added to the language that didn't introduce a great deal of footguns, unintended consequences, significant compilation performance issues... to single out contracts is unusual to say the least.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#39
post #17
post #11

I am somewhat dismayed that contracts were accepted. It feels like piling on ever more complexity to a language which has already surpassed its complexity budget, and given that the feature comes with its own set of footguns I'm not sure that it is justified. Here's a quote from Bjarne, > So go back about one year, and we could vote about it before it got into the standard, and some of us voted no. Now we have a much…

I can’t speak to the C++ contract design — it’s possible bad choices were made. But contracts in general are absolutely exactly what C++ needs for the next step of its evolution. Programming languages used for correct-by-design software (Ada, C++, Rust) need to enable deep integration with proof assistants to allow showing arbitrary properties statically instead of via testing, and contracts are /the/ key part of tha…

The devil is in the details, because standardization work is all about details.

From my outside vantage point, there seems to be a few different camps about what is desired for contracts to even be. The conflict between those groups is why this feature has been contentious for... a decade now?

Some of the pushback against this form of contracts is from people who desire contracts, but don't think that this design is the one that they want.

Re: C++26 is done: ISO C++ standards meeting Trip Report

#40

As long as programmers still have to deal with header files, all of this is lipstick on a pig.

You don't on new projects. CMake + ninja has support for modules on gcc, clang, and MSVC.

This should be your default stack on any small-to-medium sized C++ project.

Bazel, the default pick for very large codebases, also has support for C++20 modules.

Post reply on HN