r/cpp • • Sep 17 '22

Cppfront: Herb Sutter's personal experimental C++ Syntax 2 -> Syntax 1 compiler

https://github.com/hsutter/cppfront
335 Upvotes

360 comments sorted by

View all comments

Show parent comments

23

u/ToughQuestions9465 Sep 17 '22

Once again language designers forget hat programmers spend more time reading than writing. Making code as easily readable as possible should be a top priority. Instead it seems this experiment is making life of compiler writers as easy as possible. I just do not see how it can be a success. Heck if i wanted fancy weird syntax full of magical symbols i would use rust at this point, even though i think its a wasted opportunity that does not deliver anything substantial (outside of few specific areas) to mitigate loss of c++ ecosystem and to warrant switching from c++.

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.

17

u/[deleted] Sep 17 '22

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.

-2

u/SkoomaDentist Antimodern C++, Embedded, Audio Sep 17 '22

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?

→ More replies (8)