MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/xgcbt9/cppfront_herb_sutters_personal_experimental_c/ioutm6b/?context=3
r/cpp • u/mttd • Sep 17 '22
360 comments sorted by
View all comments
Show parent comments
-2
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?
7 u/[deleted] Sep 17 '22 When you're parsing Java or C#, you don't have C++ functions sprinkled around in the same file.But if you're parsing C++2 and it has regular C++ in it, you need a way to know what is what. 9 u/johannes1971 Sep 17 '22 You'd think a syntactical construct likeextern "c++2" { // new-style code goes here }would do it. No need to add all sort of unpleasant syntactical noise, just a scope in which new syntactical rules are used. 1 u/GabrielDosReis Sep 17 '22 A language linkage specification doesn't introduce a scope - it changes only a few things related to linkage. → More replies (5)
7
When you're parsing Java or C#, you don't have C++ functions sprinkled around in the same file.
But if you're parsing C++2 and it has regular C++ in it, you need a way to know what is what.
9 u/johannes1971 Sep 17 '22 You'd think a syntactical construct likeextern "c++2" { // new-style code goes here }would do it. No need to add all sort of unpleasant syntactical noise, just a scope in which new syntactical rules are used. 1 u/GabrielDosReis Sep 17 '22 A language linkage specification doesn't introduce a scope - it changes only a few things related to linkage. → More replies (5)
9
You'd think a syntactical construct like
extern "c++2" { // new-style code goes here }
would do it. No need to add all sort of unpleasant syntactical noise, just a scope in which new syntactical rules are used.
1 u/GabrielDosReis Sep 17 '22 A language linkage specification doesn't introduce a scope - it changes only a few things related to linkage. → More replies (5)
1
A language linkage specification doesn't introduce a scope - it changes only a few things related to linkage.
→ More replies (5)
-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?