• Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
Friday, October 23, 2026
freevirtualsolutions.com
  • Home
  • Virtual Assistant
  • Enterprise Technology
  • Customer Support
  • Marketing Support
  • Workforce Management
No Result
View All Result
  • Home
  • Virtual Assistant
  • Enterprise Technology
  • Customer Support
  • Marketing Support
  • Workforce Management
No Result
View All Result
Free Virtual Solutions
No Result
View All Result
Home Enterprise Technology

Contracts are in C++26 despite disagreement over their value • The Register

Ermias S. by Ermias S.
7 months ago
in Enterprise Technology
0
400
SHARES
2.4k
VIEWS
Share on FacebookShare on Twitter


The ISO C++ committee (WG21) has approved the C++26 standard, described by committee member Herb Sutter as the most compelling release since C++11, and including Contracts, despite opposition to the feature from C++ inventor Bjarne Stroustrup, among others.

The committee met in Croydon, London, and approved the standard on March 28. According to Sutter’s report, the next stage is that the final document will be prepared and sent for international approval. C++ generally ships a new standard every three years, and the committee also adopted the schedule for C++29, on which work has already started.

Contracts are one of the major features in C++26, Sutter said. Contracts are a means of setting preconditions and postconditions on function declarations, and adding assertion statements within functions. The feature is intended to help make C++ code safer and more reliable.

The paper [PDF] describing Contracts for C++26 notes that “behind the attempts to add a Contracts feature to C++ is a long and storied history.” Contracts were also part of the C++20 working draft but WG21 removed them in 2019 following major changes in the proposed design.

The C++26 proposal describes itself as the culmination of a plan to produce a minimum viable product for C++26. There are gaps, such as no support for contracts on virtual functions, though this is expected in a future version.

Sutter is an advocate for Contracts and spoke at CppCon 2025, held in Aurora, Colorado, on the “joy of C++26 contracts.”

That view is not shared by Stroustrup, who said during a presentation last year on pitfalls in C++26 contracts that “it’s claimed to be a minimal viable product. It’s not minimal, it’s not viable.”

Stroustrup said he will recommend not using contracts in C++. “This is adding complexity in very obscure ways. It’s changing the meaning of code depending on where it is… I worry a lot about the complexity, I worry about whether we can use it correctly.”

Sutter noted that some “smart and respected ISO C++ committee members have sustained technical concerns about contracts.” The vote to finalize the C++26 standard was not unanimous because of this, with 114 in favor, 12 opposed, and three abstaining. However, Sutter said “the ISO C++ committee still wants contracts, and so contracts have stayed in C++26.”

C++26 also includes compile-time reflection, allowing code to be inspected and generated without any runtime overhead. This differs from reflection in Java or C#, which works at runtime. Sutter called it “the most powerful new engine for expressing efficient abstractions that C++ has ever had.”

Sutter also talked up memory safety improvements in C++, for example, by defining erroneous behavior for uninitialized reads. In C++, undefined behavior (UB) is a major cause of errors and vulnerabilities, so the committee has a goal to reduce it, and this is one example of that effort.

The C++26 standard library has been hardened and Sutter said that, when implemented at Google, it fixed more than a thousand bugs and “reduced the segfault rate across the production fleet by 30 percent.”

Another big feature is std::execution, which provides a framework for async execution, though Sutter warned that it is “harder to adopt” than most C++ features because of poor documentation and lack of full library support. ®



Source_link

Tags: C26contractsDisagreementRegister
Previous Post

Your Team Doesn’t Need a ‘Work Family’ — It Needs This System That Holds Up When It Counts

Next Post

OmniTrust Launches Trust Lifecycle Management Platform to Secure AI, Devices, and Cloud Identities End-to-End

Next Post
OmniTrust Launches Trust Lifecycle Management Platform to Secure AI, Devices, and Cloud Identities End-to-End

OmniTrust Launches Trust Lifecycle Management Platform to Secure AI, Devices, and Cloud Identities End-to-End

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Customer Support (1,839)
  • Enterprise Technology (4,686)
  • Marketing Support (3,982)
  • Virtual Assistant (4,290)
  • Workforce Management (1,552)

Free Virtual Solutions

Welcome to freevirtualsolutionsThe goal of freevirtualsolutions is to give you the absolute best news sources for any topic! Our topics are carefully curated and constantly updated as we know the web moves fast so we try to as well.

Category

  • Customer Support
  • Enterprise Technology
  • Marketing Support
  • Virtual Assistant
  • Workforce Management

Recent Post

  • Everyone’s Arguing About AGI Taking Over — Here’s What Matters
  • from goal to live deployment
  • How to Strengthen Grantmaking Due Diligence
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions

Copyright © 2023 Freevirtualsolutions.com | All Rights Reserved.

No Result
View All Result
  • Home
  • Virtual Assistant
  • Enterprise Technology
  • Customer Support
  • Marketing Support
  • Workforce Management

Copyright © 2023 Freevirtualsolutions.com | All Rights Reserved.

Chat with us

Hi there! How can I help you?