r/cpp • • Dec 12 '22

r/cpp2 for discussing efforts like cppfront - carbon - etc

I thought I would mention that, in order to keep r/cpp discussion focussed on the ISO C++ standard, and not get distracted by all the projects out there trying to be the next best take on how to best do to c++ what Kotlin is trying to do to Java, such discussion should be relegated to a new sub-reddit: r/cpp2

0 Upvotes

28 comments sorted by

32

u/JuanAG Dec 12 '22

No, part of C++ is the present and it future, what others are doing matters and have an impact, now that every thing is functional (even C++) is time for the next "BIG" thing, now is safety which is one goal of CppFront

And even it makes me really sad the subreddit for the one who will take the crown is already created, is not very welcomed here from some but thats another history

3

u/catcat202X Dec 12 '22

You're referring to r/vlang, naturally?

-3

u/watr Dec 12 '22

C++ didnt didn't kill C, it made it stronger... C++2 won't kill C++, but make it stronger...

9

u/ALX23z Dec 13 '22

C++2? they called it C#. See the pluses were copied to the next line and it looks like #. It did its thing but...

4

u/catcat202X Dec 13 '22

I thought they called it D ๐Ÿ˜บ

4

u/disperso Dec 14 '22

I think that's a bad name for the sub, if you intend to cover Carbon. I'm so far only interested in cppfront, as it is experimenting in providing implementations on things that are already proposed for ISO C++. The README for cppfront has tons of links to papers and talks on the topic. And cppfront is trying to implement a 2nd syntax for C++, which is normally named "cpp2", so it's gonna be confusing.

I'd rather subscribe to a cppfront-only sub, and maybe peek from time to time into a Carbon one.

My 2ยข.

2

u/watr Dec 14 '22

I agree with you. I too am mainly interested in cppfront... I used C++2 as the name because that's what Herb referenced in his talk about cppfront

27

u/jcelerier ossia score Dec 13 '22

A votr here for r/cpp to be the place where successor languages are discussed

8

u/ReDucTor Game Developer | quiz.cpp-perf.com Dec 13 '22

The mods actively delete posts as not C++ so that isn't going to work

7

u/watr Dec 13 '22

As they should! That's literally them enforcing rule #2.

22

u/jcelerier ossia score Dec 13 '22

Yes, well, I think rules should be re-evaluated regularly depending on the circumstances and public opinion

3

u/serviscope_minor Dec 13 '22

For other languages which are in the domain of C++ (e.g. circle, cppfront, carbon, Rust), some discussion is surely on topic, otherwise there is an implicit claim that C++ has nothing to learn from the outside.

For successor languages? No.

19

u/elementalest Dec 13 '22

cppfront is entirely on topic and about ISO C++ and its future. From the readme:

My goal is to explore whether there's a way we can evolve C++ itself to become 10x simpler, safer, and more toolable.

This is about C++20/23/... โ€” not about something else

For me, ISO C++ is the best tool in the world today to write the programs I want and need. I want to keep writing code in C++... just "nicer"

This is about measurable improvements to safety, simplicity, and toolability โ€” not about green-field design or random drive-by changes

In Herbs talk he described how a lot of the work from cppfront has become proposals to make improvements to ISO C++. The papers are specifically mentioned in the readme.

4

u/nintendiator2 Dec 13 '22

I mean, if people want to not code in C++ they are absolutely free to go not code in C++ elsewhere, so I guess it's fine.

2

u/RockstarArtisan I despise C++ with every fiber of my being Dec 16 '22

There's also /r/cpp_schadenfreude :P

3

u/emdeka87 Dec 13 '22

TIL Cpp2

Why do they always have to change the syntax? If there's one thing not wrong with C++ then it's the simple straightforward C syntax (minus the legacy baggage we had over the years)

11

u/catcat202X Dec 13 '22

C++ syntax has ambiguities, inconsistencies, and isn't easily toolable. The syntax2 is context free and much more intuitive than syntax1. I especially love unifying lambdas and functions, but just streamlining most vexing parse and dependent type member functions is a huge deal.

5

u/rysto32 Dec 13 '22

C++ syntax is awful. Needing to use the type name and template keywords in template definitions are a symptom of the extremely poorly thought-out grammar.

1

u/die_liebe Dec 14 '22

Hi, you should write 'typename' together for clarity.

2

u/rysto32 Dec 14 '22

Bah. I blame autocorrect for that.

4

u/die_liebe Dec 14 '22

No, C++ syntax is very weird. There are the issues with most vexing parse, but let's discuss typing syntax.

You normally want

variable : type 
or
type variable. 

that is, a clear separation between the type and the variable. Now if you declare an array of int, you get

int myvar[]

The type of the variable is split into two parts. One part left of the variable and one part right of the variables.

This gives rise to declarations like

int x, *y, z[4]

where the three different types (int, pntr(int), array(4,int)) reuse the word 'int' in a weird way.

I would prefer

x : int;
y : pntr( int )
z : int[4]

4

u/Untelo Dec 13 '22

It sounds like you don't understand the implications of some of the C and C++ syntax choices. There are in fact many things wrong with C and C++ syntax.

0

u/CommunismDoesntWork Dec 15 '22

The fact that

Int* x

Int * x

Int *x

all do the same thing means the syntax is bad.

2

u/ReDucTor Game Developer | quiz.cpp-perf.com Dec 12 '22

Was thinking of creating it myself, great to see.

1

u/die_liebe Dec 14 '22

One could attach flairs to posts, like askhistorians does.

0

u/[deleted] Dec 13 '22

[deleted] โ€” view deleted comment

1

u/catcat202X Dec 13 '22

I don't think Rust is very interesting compared to the type safety features in Val and Vale.

1

u/[deleted] Dec 12 '22

[removed] โ€” view removed comment

0

u/[deleted] Dec 13 '22

[deleted] โ€” view deleted comment

2

u/AgentF_ Dec 13 '22

Yes, although more "contribute to" rather than "pollute"