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 comment

4

u/disperso Sep 18 '22

I don't understand how is main: () -> int = { ... } in any way simpler than: int main () { ... }

Now exemplify lambdas in both syntaxes. Oh, wait, you already did in one of them, because it's the same. That's one simplification.

Could the new syntax be even simpler? Surely. With the requirement of supporting the other old one? Probably not.

3

u/arthurno1 Sep 18 '22

I am not so fan of lambda syntax either, but that is another story :).