DEV Community

Discussion on: Will Carbon replace C++?

Collapse
 
armousness profile image
Sean Williams

The few things I've read about it mostly just remind me of this comic:

Image description

I haven't seen a clear statement of what's actually better about Carbon vs C++. All I can figure is, this is an attempt to solve the "kitchen sink" problem, where C++ has gotten haphazardly more complicated over the decades. That's why it reminds me of the xkcd, since I don't think that adding more standards is the solution to the problem of too many standards.

Especially standards created by Google, god help us.

Collapse
 
lorenzojkrl profile image
Lorenzo Zarantonello

Ahahah true!
However the scope seems limited to migrating big C++ code bases to something “better and easier to use”. Whatever that will be.
For very big corporations it might be useful.
I don’t think it will become a standard, just my two cents

Collapse
 
armousness profile image
Sean Williams

But the question remains, what does Carbon bring to the table?

C++ was one of the pioneers in explicit type variables (i.e., templates, which I'm pretty sure is what people mean when they say "generics"). I can't imagine Carbon will support higher-kinded polymorphism or type families or dependent types, so what makes a template system "modern," and what advantage does that give you over C++ templates?

C++ was also a pioneer in explicit modularity, not just with classes but with namespaces. What makes a module system "modern," and what advantages does that give you over C++ namespaces?

Simple syntax is the one I was alluding to. C++ has a (deserved) reputation for including everything but the kitchen sink in its specification. Is that what this is really about? Does it make sense to create a new programming language because another language is too bloated? Because you can just... not use features you don't like.

Thread Thread
 
lorenzojkrl profile image
Lorenzo Zarantonello

I guess we'll see in the next few years.
Some skepticism is probably healthy:)