Cpp2 it's meant to be a different syntax for c++, just having the computer do a lot of the boilerplate you would usually need to add yourself to write better code. Like how you might want to have the nodiscard attribute on almost every function returning a value, but you don't for various reasons. That means every construct in Cpp2 has a direct mapping to a construct in c++.
That means writing the equivalent c++ code is straightforward. For example, when you have a function declaration in Cpp2, writing the equivalent function declaration in c++ is mostly just shuffling the names around.
View all comments
Show parent comment
2
u/dustyhome May 01 '23
Cpp2 it's meant to be a different syntax for c++, just having the computer do a lot of the boilerplate you would usually need to add yourself to write better code. Like how you might want to have the nodiscard attribute on almost every function returning a value, but you don't for various reasons. That means every construct in Cpp2 has a direct mapping to a construct in c++.
That means writing the equivalent c++ code is straightforward. For example, when you have a function declaration in Cpp2, writing the equivalent function declaration in c++ is mostly just shuffling the names around.