Skip to content

Commit ca851dc

Browse files
authored
Add benefits
This adds an overview for the cpp2 benefits. I really liked one of Herb's comment on Reddit, as it provided a very nice overview about the benefits of this project. This commit adds that comment in slightly different form, and I hope it can lead to a better understanding of the benefits of Cpp2. I feel like the current README misses a short, condensed overview, for what cpp2 already achieves today. In some talks with existing cpp developers, I found that their subjective interpretation of the state of the language, is FAR behind the reality. Signed-off-by: ShalokShalom <[email protected]>
1 parent b2d4020 commit ca851dc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ Copyright (c) Herb Sutter &#x2022; See [License](LICENSE)
88

99
Cppfront is a compiler from an experimental C++ 'syntax 2' (Cpp2) to today's 'syntax 1' (Cpp1), to prove out some concepts, share some ideas, and prototype features that can also be proposed for evolving today's C++.
1010

11+
Cpp2 today has
12+
13+
- *guaranteed initialization safety* (stronger than in C# or Java),
14+
15+
- *guaranteed type safety* (via `safe is` type queries and `as` casts),
16+
17+
- *bounds safety* via subscript checking, banning pointer arithmetic, and safe-by-construction iteration such as range-for, and
18+
19+
- *lifetime safety static analysis.*
20+
21+
If CVEs in C++ code were 98% lower (2% of today) in the four key buckets -- initialization safety, type safety, bounds safety, and lifetime safety -- we could all sleep better.
22+
1123
## Documentation: [available here](https://hsutter.github.io/cppfront/)
1224

1325
## What's different about this project?

0 commit comments

Comments
 (0)