You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ main: () = {
9
9
10
10
## <aid="what-is-cpp2"></a> What is Cpp2?
11
11
12
-
"Cpp2," short for "C++ syntax 2," is my ([Herb Sutter's](https://github.com/hsutter)) personal project to try to make writing ordinary C++ types/functions/objects be much **simpler and safer**, without breaking backward compatibility. Bjarne Stroustrup said it best:
12
+
"Cpp2", short for "C++ syntax 2", is my ([Herb Sutter's](https://github.com/hsutter)) personal project to try to make writing ordinary C++ types/functions/objects be much **simpler and safer**, without breaking backward compatibility. Bjarne Stroustrup said it best:
13
13
14
14
> "Inside C++, there is a much smaller and cleaner language struggling to get out." <br>  — Bjarne Stroustrup, _The Design and Evolution of C++_ (D&E), 1994
Here we can see more of how Cpp2 makes it features work.
96
+
Here we can see more of how Cpp2 makes its features work.
97
97
98
98
**How: Consistent context-free syntax.**
99
99
@@ -108,15 +108,15 @@ Here we can see more of how Cpp2 makes it features work.
108
108
109
109
**How: Simplicity through generality + defaults.**
110
110
111
-
- **Line 7: `in` parameters** are implemented using `#cpp2::in<>`, which is smart enough to pass by `#!cpp const` value when that's safe and appropriate, otherwise by `#!cpp const&`, so you don't have to choose the right one by hand.
111
+
- **Line 7: `in` parameters** are implemented using `#!cpp cpp2::in<>`, which is smart enough to pass by `#!cpp const` value when that's safe and appropriate, otherwise by `#!cpp const&`, so you don't have to choose the right one by hand.
112
112
113
113
**How: Order-independent by default.**
114
114
115
-
- **Lines 5 and 7: Order independence** happens because cppfront generates all the type and function forward declarations for you, so you don't have to. That's why `main` can just call `hello`: Both are forward-declared, so they can both see each other.
115
+
- **Lines 5 and 7: Order independence** happens because cppfront generates all the type and function forward declarations for you, so you don't have to. That's why `main` can just call `hello`: both are forward-declared, so they can both see each other.
116
116
117
117
**How: Seamless compatibility and interop.**
118
118
119
-
- **Lines 9-11 and 16: Ordinary direct calls** to existing C++ code, so there's never a need for wrapping/marshaling/thunking.
119
+
- **Lines 9-11 and 15: Ordinary direct calls** to existing C++ code, so there's never a need for wrapping/marshaling/thunking.
0 commit comments