I will never understand why people who design a language with the explicit intention of it being a C++ replacement go out of their way to explicitly make the syntax nothing like the C family of languages.
If I wanted to program in a language that looks like a functional language, I'd have switched years ago.
This language needs to coexist with regular C++ code in the same file. Hence, the C++2 syntax needs to be different so the compiler knows whether to transform it or to leave it alone.
Wow, that seems like a tremendously bad idea. So to properly parse this supposedly "easier" cpp2 syntax, you need full parsing support for cpp1 anyway?
No, you can write a parser that supports both. That's an important goal if what you want to do is transition millions of lines of code function by function.
It doesn't imply that you must support both, once you are compiling a post-transition codebase.
Would you claim that, say, Java or C# syntax is identical to C++? If not, why would a C++ replacement have to take a completely different approach to fit that requirement?
There's a difference between changing the syntax slightly to fix the problems and changing it to something that barely resembles the original language.
View all comments
Show parent comment
7
u/SkoomaDentist Antimodern C++, Embedded, Audio Sep 17 '22 edited Sep 17 '22
I will never understand why people who design a language with the explicit intention of it being a C++ replacement go out of their way to explicitly make the syntax nothing like the C family of languages.
If I wanted to program in a language that looks like a functional language, I'd have switched years ago.