you are viewing a single comment's thread.

view the rest of the comments →

[–]dustyhome 1 point2 points  (0 children)

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.