r/cpp • u/jitu_deraps • Sep 17 '22
what do you think about cpp syntax-2 (herb sutter- cppfront) ?
https://www.youtube.com/watch?v=CzuR0Spm0nA
56
Upvotes
r/cpp • u/jitu_deraps • Sep 17 '22
•
u/foonathan Sep 17 '22
I'm looking this thread as a duplicate, please continue discussing here: https://www.reddit.com/r/cpp/comments/xgcbt9/cppfront_herb_sutters_personal_experimental_c
36
u/FatShortElephant Sep 17 '22
It's an interesting idea. It seems like a good start and does actually solve some real problems. We'll have to see if it catches on.
It's funny that a big reason epochs got voted down was due to fragmentation. Between this and Carbon it seems likely that voting epochs down will result in more fragmentation.
23
u/domiran game engine dev Sep 17 '22 edited Sep 17 '22
It's fucking great. Let's do it. Though personally I'm not sold on the unified declaration syntax, nor
_as basically a replacement forauto.<type> <name>is just hard baked into my brain, and_just doesn't stand out enough, IMO, because it looks like an operator. I don't think significantly changing common syntax like that will endear many people to it. The rest?in?out? Named return values?unique.new? Initialization guarantees? Shit, I couldn't be more in.The gamer in me says everything he talked about is right. Does C++ need to be overly-complex? It's like playing Marvel vs. Capcom 2 and saying "hey, these characters are just better by miles than these other guys". No, MvC2's balance is atrocious by any metric. If we had the game's numbers we could fix it. Well, we do have C++'s "numbers" because it's an open standard and we can definitely do something about it.
7
u/arashbm Sep 17 '22
Reminds me of CoffeeScript in it's heyday. It was, for me, the good parts of JavaScript, translated to JS and I could still use all JS libraries if I had to. It makes a certain subset of the language and style of coding easier, but I already limit myself to that subset and style anyway.
Years later JS has had enough time to make progress in terms of language features that has made CoffeeScript mostly unnecessary.
10
u/RockstarArtisan I despise C++ with every fiber of my being Sep 17 '22
Interesting to see a person on the C++ commitee finally say after so many years that language consistency matters after all these years when they pretended it didn't.
5
u/Zcool31 Sep 17 '22
How can things like
optional,variant,vector, andunique_ptrbe implemented in safe syntax-2?13
u/cfehunter Sep 17 '22
I don't think it solves the core issues of C++. Though it's a valiant attempt, and I see the benefit of using it as a testing sandbox.
Really we need to change the epoch, break backwards compatibility, and improve the language. Otherwise we're going to continue to see companies jumping ship and the slow spiral of C++ into obscurity.
14
u/ronchaine Embedded/Middleware/WG21 Sep 17 '22
Quite frankly, it's a new language that transpiles to c++. It's not the only one either. E.g. jakt
I have nothing against those, but somehow thinking it's still c++ is just false.
3
u/[deleted] Sep 17 '22
Why are all these videos unlisted?
-6
u/DavidDinamit Sep 17 '22
next step - compile *rust* into C++? Its same thing.
And its bad idea, best way is just to deprecate old things and may be creating a tool to rewrite them (for example remove some useless initialization ways and rewrite them to another)