News for hackers. Stuff that matters.
Re:Carbon Language: An experimental successor to C++ by usrusr on Tuesday July 19, 2022 @12:11PM (#32153818)
Considering the seemingly endless list of things that deliberately don't break with the c++ legacy, new syntax is almost the only change left. And if you were about to give c++ a syntax reboot, why wouldn't you look at what successful other modern syntaxes are doing? "c++, but in a syntax for people accustomed to rust instead of in a syntax for people accustomed to C" sounds like a perfectly reasonable approach.

Your perception (and mine) that rust is about to become the new default for "true native" is perfectly consistent with this, a language for the rust generation for when they have to deal with the c++ legacy. A legacy that won't be going away any time soon. I suspect that the author (authors?) wouldn't disagree at all with "use Rust when possible, Carbon when you can't", my perception (from a quick glance at the site) is that they are fully aware of the limitations of the niche they have so clearly staked out.

Re:Carbon Language: An experimental successor to C++ by kllrnohj on Tuesday July 19, 2022 @01:25PM (#32155034)
> I suspect that the author (authors?) wouldn't disagree at all with "use Rust when possible, Carbon when you can't"

That is in fact explicitly stated on the Carbon introduction:

"Existing modern languages already provide an excellent developer experience: Go, Swift, Kotlin, Rust, and many more. Developers that can use one of these existing languages should."

Re:Carbon Language: An experimental successor to C++ by nextaccountic on Wednesday July 20, 2022 @12:13AM (#32161339)
Also on their FAQ https://github.com/carbon-language/carbon-lang/blob/trunk/do...

> If you can use Rust, ignore Carbon

> If you want to use Rust, and it is technically and economically viable for your project, you should use Rust. In fact, if you can use Rust or any other established programming language, you should. Carbon is for organizations and projects that heavily depend on C++; for example, projects that have a lot of C++ code or use many third-party C++ libraries.

Re:Carbon Language: An experimental successor to C++ by mempko on Tuesday July 19, 2022 @12:30PM (#32154145)
The problem with C++ is it keeps getting better. There was a time when Rust was interesting to me but then C++11 came out. Then they kept improving it
Re:Carbon Language: An experimental successor to C++ by fsloth on Tuesday July 19, 2022 @12:45PM (#32154400)
Regarding C++. IMHO - it’s not getting intrinsically better. More complex. Easy things become a bit less verbose, but the hardest things remain as hard and the compiler is as unhelpful as before.

I agree C++11 and it’s successors are sugaring the language to be a lot nicer but fundamentally nothing has changed.

Rust is fundamentally better in it’s compiler warnings (they are actually helpful), and contains specific solutions to the things that are hard and bite you in C++.

C++ is not going away and it’s my main professional language but Rust does have features that are better.

Re:Carbon Language: An experimental successor to C++ by spacechild1 on Tuesday July 19, 2022 @02:40PM (#32156077)
> but fundamentally nothing has changed.

IMO, move semantics and lambda functions have fundamentally changed the way we write C++.

Also, let's not forget that C++11 introduced a formal memory model with cross-platform atomic operations and multi-threading primitives.

Re:Carbon Language: An experimental successor to C++ by plonk on Tuesday July 19, 2022 @03:07PM (#32156430)
Fundamentally, it has smart pointers and std::make_unique now, which means I never have to touch a raw pointer in most of my code. They can even be adapted to wrap Win32 objects. That's a huge improvement and I don't mind using C++ for new projects now.
Re:Carbon Language: An experimental successor to C++ by sudosysgen on Tuesday July 19, 2022 @12:59PM (#32154663)
In my experience compiler error messages have gotten hugely better, except for template issues which are still very verbose. Especially with clang.
Re:Carbon Language: An experimental successor to C++ by senkora on Tuesday July 19, 2022 @10:50PM (#32160783)
And template error messages should become much better with concepts in c++20.
Re:Carbon Language: An experimental successor to C++ by fouronnes3 on Tuesday July 19, 2022 @12:34PM (#32154208)
C++ has virtually zero tooling and the committee is not interested in ever working on that. Comparing CMake to cargo is like comparing fifth century fireworks to the Space Shuttle. I mean we are getting modules that aren't literally copy paste maybe next year.
Re:Carbon Language: An experimental successor to C++ by StillBored on Tuesday July 19, 2022 @02:36PM (#32156028)
"C++ has virtually zero tooling"

I read that and I was like WTF, the entire programming ecosystem exists on C/C++ tooling. But from your perspective its modules/cargo that is the tooling?

That is IMHO an odd viewpoint. As someone who despises the way cargo works, and hates not having long term explicit control over my dependencies (going so far as to track and check them in along with build artifacts) I'm not convinced that the recent toss another random dependency that itself pulls dependencies into the build is a good thing.

I like the fact that I have three dozen+ different ways to do regexp's in C depending on my priorities, and that picking one requires cognitive overhead and modifications to source control/etc. Its easy to add a line to a makefile/etc to pull crap off github in C, so its not like this is a hard problem to deal with in C/C++ but its one where the scale of the problem allows for optimization. AKA like the dynamic typing argument, making the programmer think about a problem I believe yields a better solution.

Its also one where i'm not tied to the whimsy of the library author should I decide to fork or maintain the code long after they have gotten bored or rewritten it 3 different times. I can to this day rebuild code I wrote 20 years ago on a modern machine with little effort. Can you say the same about even 10 year old node.js or python code?

Put another way, I spend a little bit more on upfront effort and it pays off long term. And I know i'm in the minority, but its also why repeatedly I've run small teams of a half dozen or so people who's products are ahead of major competitors with teams of 100's+ of engineers.

Re:Carbon Language: An experimental successor to C++ by boardwaalk on Tuesday July 19, 2022 @03:18PM (#32156591)
You can do things the way you do them in C++ in Rust if you want. You could `cargo vendor`, you could fork a repo & depend on a specific commit, etc. It’s up to you have the self-control to do that though and not just shovel random dependencies into your project, that’s all.

Mostly you seem to be complaining that it’s just to add dependencies? (maybe put a ‘sleep’ in your bash prompt or something?) and maybe that the Rust ecosystem doesn’t have as many duplicate libraries as C++? (of course it doesn’t?)

Re:Carbon Language: An experimental successor to C++ by StillBored on Tuesday July 19, 2022 @03:57PM (#32157105)
The problem is that cargo gets in the way (as does rustc) if you try and use it in anything other than the simple import this dependency mode. I spent a hell hole of a day or two, trying to pick up a dependency outside cargo because it didn't behave in a way that meshed with the rest of my build environment.

So, yes it handles a couple of the basic cases, but then your out of luck, stuck in a version hell/etc because rustc and cargo are so tightly integrated and the flags needed to emulate some of the behavior with just the compiler are poorly documented and/or version dependent.

It dictates, you conform (which is basically the rust way).

Re:Carbon Language: An experimental successor to C++ by germandiago on Tuesday July 19, 2022 @04:41PM (#32157674)
The problem with the typical rants about C++ is that you guys are outdated.

With Conan you can consume over 1,000 packages directly from build systems and with way more control than what Cargo seems to offer. Take a look. I did use it for a while and compared to 15 years ago things are way better now.

Re:Carbon Language: An experimental successor to C++ by flohofwoe on Wednesday July 20, 2022 @01:54AM (#32161955)
The problem isn't that Conan exists, but that other competing solutions are just as popular which results in fragmentation (for instance vcpkg, and cmake can also directly pull in external dependencies now). In the Rust world there's just Cargo.
Re:Carbon Language: An experimental successor to C++ by pjmlp on Wednesday July 20, 2022 @04:08AM (#32162854)
Not really, Android and Fuchsia have their own cargo replacements, that fit better on their OS SDKs.

Either that, or we get a box of surprises in each build.rs script.

Re:Carbon Language: An experimental successor to C++ by Asm2D on Wednesday July 20, 2022 @04:13AM (#32162880)
Competing solutions are great for innovation.
Re:Carbon Language: An experimental successor to C++ by woodruffw on Wednesday July 20, 2022 @08:39AM (#32164899)
In the world of build systems, I think most people want a little more consistency and a little less innovation. Sometimes a tool should just do its job and broadly resemble other tools in the space.
Re:Carbon Language: An experimental successor to C++ by gkbrk on Wednesday July 20, 2022 @01:27PM (#32169174)
> In the Rust world there's just Cargo.

While not nearly as popular as Cargo (due to being blessed by the core team), Rust still has multiple build tools and package managers.

Re:Carbon Language: An experimental successor to C++ by germandiago on Wednesday July 20, 2022 @05:19AM (#32163272)
Fragmentation is not the problem. The future of C++ is to have metadata exchange, at least the way I see it.

This means that packages can be compiled with any build system, the one that fits you better. In the event that you cannot find a binary that fits you, your package manager can compile on the fly. There are also solutions to keep binary artifacts in Conan. This means that most of the time you can consume pre-made packages in vcpkg/Conan for casual consumption but you can still have binary repositories with fully customized builds for all your permutations of compilers and systems and debug/release. Do not forget this is a hard problem, we are talking to compilation to native, sometimes you need full speed and a custom compilation, not about portable Java bytecode.

But you can still set up and tweak recipes in Conan and upload to your binary repository (what we do at my company).

However, none of these things tie you to a build system, since conan can generate .pc, .cmake, MSBuild, XCode and way more metadata to consume those packages.

You can scale from simple to fully customized. For example before we had a libcxx that we compiled ourselves and pointed all deps and patched packages and could build something with like twenty-some dependencies with that customized libcxx optimized for us. Can you do that with Cargo? Serious question, I did not make extensive use of it.

However for simple uses you can just drop a conanfile.txt and conan install your profile and start to consume your packages. All of this works with CMake, but if I want to use Meson build system or SCons, Make and others I can do it as well. Look at the generators page: https://docs.conan.io/en/latest/reference/generators.html

I do not think fragmentation in build systems is even a real problem anymore because the "not fragmented but simple" philosophy leaves many things out of the box, such as compiling something custom when you really need it.

The system is very flexible. True that the learning curve is harder at first, but much simpler than it used to be in the past.

I can have full projects, not even with Conan, just with simple Meson wraps (Meson wraps are source-only dependencies though) pointing interdependencies to the same version of a library with a very reasonable amount of work: sometimes a single switch in the options, sometimes a small patch that you can keep in your subprojects/ directory or somewhere else.

I can easily generate .cmake and .pc files from Meson itself without trouble, which are two of the most used build systems. But if on top of that you build a Conan recipe then you can have many consumers of your packages for free.

It is nice to have a tool that is more ore less streamlined sometimes, but build systems is a difficult topic and probably there are some that do a few things better than others: cross-compilation, linux tweaks, generating VS solutions for you if your company uses VS, XCode or whatever. It is not bad to have a choice as long as you can interchange.

I would say it is even better than having the one-size-fits-all thing and later when you want to go to the real native stuff then you discover that your tool is too basic and cannot switch.

Re:Carbon Language: An experimental successor to C++ by adev_ on Tuesday July 19, 2022 @07:04PM (#32159127)
> C++ has virtually zero tooling and the committee is not interested in ever working on that

This sentence makes no sense at all:

1 - Tooling does not stop to the build systems

2 - The tooling set in C++ (and C) has been built over decades. It is indeed not a single shiny CLI cargo-style but it several order of magnitude bigger and more powerful than anything you will ever find in any other programming language: memtracers, profilers, thread sanitizers, debuggers, disassemblers, static analyzers, packages managers, bindings generators, ABI checkers, crash analyzers, loggers and I am sure I forget still many others.

Re:Carbon Language: An experimental successor to C++ by fouronnes3 on Wednesday July 20, 2022 @01:28AM (#32161795)
Yeah what I meant was build system tooling, sorry for the approximation.
Re:Carbon Language: An experimental successor to C++ by flohofwoe on Wednesday July 20, 2022 @01:58AM (#32161981)
Most of the tools you mention work below the language level, and thus work automatically for non-C/C++ languages too (or at least LLVM-based languages).
Re:Carbon Language: An experimental successor to C++ by adev_ on Wednesday July 20, 2022 @05:31AM (#32163343)
They do work below the language level but have been generally explicitly made for C and C++ programs. e.g abi-compliance-checker

The other languages benefit of them currently because they leverage LLVM (also made in C++), because their interpreter/VM are made directly in C.

How is it already ? Standing on the shoulders of giants ? :)

Re:Carbon Language: An experimental successor to C++ by germandiago on Wednesday July 20, 2022 @01:03PM (#32168750)
> C++ has virtually zero tooling

CMake, Meson, Waf, Conan, Visual Studio Code, Visual Studio, CLion, Intel VTune, GDB, LLDB, XCode, Artifactory, SonarQube, clang-tidy, clang-format, astyle, Incredibuild...

> Comparing CMake to cargo is like comparing fifth century fireworks to the Space Shuttle

You are wrong here. Cargo serves a set of fixed "this-is-how-to-do-it" thing. In C++ you can build anything. I do not mean it is better, but C++ software already exists and that is the solution that it works better for it. :)

> and the committee is not interested in ever working on that

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p08...

Interoperability effort for modules: https://github.com/GabrielDosReis/ipr

Re:Carbon Language: An experimental successor to C++ by germandiago on Tuesday July 19, 2022 @04:39PM (#32157647)
Besides having lsp (language server protocol), Visual C++, CLion and others, I have been successfully using CMake/Meson paired with Conan and I can tell from experience that it is amazing what you can achieve.

Someone will say Cargo or whatever, which is nice and simple. But with these tools you can choose all details and optimizations as well, something that other tools just hide. But you can still keep it simple with a conanfile.txt for your dependencies and the stock add_executable etc. in CMake/Meson and get done with it. If you feel CMake is subpar (bc its syntax and DSL are terrible, I agree with that) then you can use Meson. It works pretty well.

Re:Carbon Language: An experimental successor to C++ by pjmlp on Tuesday July 19, 2022 @01:01PM (#32154697)
Use Visual C++ and you will have modules today.

I have cargo today in C++ via NuGET and vcpkg, and what is great about it, I don't have to compile my depedencies from scratch.

Re:Carbon Language: An experimental successor to C++ by joshuamorton on Tuesday July 19, 2022 @01:08PM (#32154789)
> I have cargo today in C++ via NuGET and vcpkg, and what is great about it, I don't have to compile my depedencies from scratch.

To be fair, if you're using a language that has a reasonable compilation story, this is only every a concern the first time you compile.

Re:Carbon Language: An experimental successor to C++ by pjmlp on Tuesday July 19, 2022 @01:10PM (#32154816)
Sure I always need an excuse to go out for lunch.
Re:Carbon Language: An experimental successor to C++ by mbrodersen on Tuesday July 19, 2022 @10:04PM (#32160479)
Hahaha you have zero clue. C++ has the best tooling in the world. From static analysers to best in class debuggers to best in class performance profiling tools etc. No other language comes even close.
Re:Carbon Language: An experimental successor to C++ by int_19h on Monday July 25, 2022 @02:28PM (#32228777)
Java has far more extensive tooling in all the categories that you've mentioned. I don't know if it's "the best tooling in the world", but if I had to make an educated guess, I'd bet on Java - and I don't even like it as a language.
Re:Carbon Language: An experimental successor to C++ by flohofwoe on Wednesday July 20, 2022 @02:01AM (#32162006)
Most of the tools you mention are actually language agnostic (debuggers and profilers). And static analyzers are much more important for C and C++ than other languages.
Re:Carbon Language: An experimental successor to C++ by AnimalMuppet on Tuesday July 19, 2022 @01:00PM (#32154690)
Given that gunpowder was invented in the 9th century, fifth century fireworks were probably pretty uninteresting...
Re:Carbon Language: An experimental successor to C++ by raydev on Tuesday July 19, 2022 @01:00PM (#32154682)
It's impossible to deny that C++ is improving.

But it's worth investigating what you can do when you aren't tethered to wild inconsistencies and odd behaviors and workarounds because the community is terrified of breaking backcompat.

Re:Carbon Language: An experimental successor to C++ by JoshTriplett on Tuesday July 19, 2022 @02:58PM (#32156307)
C++11 was where C++ lost me, and I went from saying I knew C/C++ to saying I know C.
Re:Carbon Language: An experimental successor to C++ by imron on Tuesday July 19, 2022 @08:13PM (#32159678)
C++14 was what got me in to Rust.

I'm still in the C++ world for work, and have kept reasonably up to date with things to C++17, but I'm sitting here looking at C++20 and wondering is it really worth the effort...

Re:Carbon Language: An experimental successor to C++ by a9h74j on Tuesday July 19, 2022 @09:56PM (#32160424)
Precisely.
Re:Carbon Language: An experimental successor to C++ by gpderetta on Tuesday July 19, 2022 @12:48PM (#32154460)
Doesn't C++11 precede rust?
Re:Carbon Language: An experimental successor to C++ by tialaramex on Tuesday July 19, 2022 @03:03PM (#32156386)
Rust 1.0 is 2015. Hence this is sometimes referred to as "2015 edition" in Rust's edition system.

But the sort of people who are here to tell you about how great C++ is will say well, actually Rust existed all the way back to 2006 as Graydon's personal project. There were no numbered releases until Rust 0.1 (after C++ 11) and modern features like Traits don't appear until much later, but sure, in this sense Rust existed in 2006.

Re:Carbon Language: An experimental successor to C++ by avrionov on Tuesday July 19, 2022 @01:11PM (#32154834)
I had the same question as you so I checked. C++ 11 standard was released in 2011 of course. Rust development started in 2006 and Mozilla announced it officially in 2010.
Re:Carbon Language: An experimental successor to C++ by arinlen on Tuesday July 19, 2022 @02:20PM (#32155845)
> C++ 11 standard was released in 2011 of course. Rust development started in 2006 and Mozilla announced it officially in 2010.

Given that c++0x was a decade in the making, by that measuring stick the answer is yes, C++11 does precede Rust.

Re:Carbon Language: An experimental successor to C++ by bzxcvbn on Tuesday July 19, 2022 @02:55PM (#32156267)
It's a bit weird to take the release date for one, and the start of the development for the other. By that measure, the first pre-alpha (!) release of Rust was in 2012; the first stable release in 2015. On the other hand, the first RFC for C++0x was in 2008.
Re:Carbon Language: An experimental successor to C++ by grimfang4 on Tuesday July 19, 2022 @12:56PM (#32154620)
Almost. C++0x did, but C++11 doesn't and some compilers/IDEs (e.g. VS) didn't implement full support for C++11 for years.
Re:Carbon Language: An experimental successor to C++ by imron on Tuesday July 19, 2022 @11:10PM (#32160922)
> The problem with C++ is it keeps getting better

This is debatable.

It keeps getting more complex. Whether all the additions are worthwhile remains to be seen.

Re:Carbon Language: An experimental successor to C++ by jcelerier on Wednesday July 20, 2022 @06:47AM (#32163844)
every successive C++ standard allows me to remove a lot of code which is a net benefit
Re:Carbon Language: An experimental successor to C++ by mihaigalos on Tuesday July 19, 2022 @12:54PM (#32154590)
As far as I'm concerned, C++ is there for legacy purposes only.

There are some nice frameworks and tools using it, sure. Yes, you are required to learn it if you are studying CS.

Any serious new development today is done using more modern languages such as Rust (i.e.: the linkerd service mesh proxy [1] for encrypted pod communication in a k8s cluster).

As even the Linux kernel is slowly transitioning to using Rust [2], it's only a matter of time before an inflection point is reached and it goes mainstream (if not already.)

[1] https://github.com/linkerd/linkerd2-proxy

[2] https://hackaday.com/2022/05/17/things-are-getting-rusty-in-...

Re:Carbon Language: An experimental successor to C++ by mbrodersen on Tuesday July 19, 2022 @10:09PM (#32160514)
Hahaha wow. There are more than 5 million C++ programmers out there. Starting new C++ projects every day. I am pretty sure more new C++ projects are started every day than Rust projects. Everything (including Rust) runs on top of browsers/operating systems/drivers/compilers/VMs written in C/C++. Rust code is like a drop in the ocean compared. Maybe in 30 years that will changed? Don’t count on it.
Re:Carbon Language: An experimental successor to C++ by pjmlp on Tuesday July 19, 2022 @12:59PM (#32154660)
Just learned that LLVM, GCC, CUDA, HPC, HFT and the whole games industry aren't serious new development.
Re:Carbon Language: An experimental successor to C++ by mihaigalos on Tuesday July 19, 2022 @01:05PM (#32154752)
.. is it new development?
Re:Carbon Language: An experimental successor to C++ by pjmlp on Tuesday July 19, 2022 @01:11PM (#32154835)
I guess, unless you're into retro-gaming.
Re:Carbon Language: An experimental successor to C++ by maccard on Tuesday July 19, 2022 @02:33PM (#32155982)
To be fair, parts of my work codebase are touching on 25 years old, and I work for a startup from 2020. The codebases we're building on have roots in the mid 90s, and the platforms they run on didn't support modern C++ standards for a very long time after that.
Re:Carbon Language: An experimental successor to C++ by Jensson on Tuesday July 19, 2022 @03:23PM (#32156650)
So anything including "windows.h" isn't really new development then? Sounds like a strange definition.

I'd say that there is a lot of new projects being started with C++, still way more than there are new projects in Rust, at least if you only count serious ones.

Re:Carbon Language: An experimental successor to C++ by Nullabillity on Wednesday July 20, 2022 @07:51AM (#32164387)
GCC is from the 80s, Unreal and Source are both from the 90s, and LLVM and CUDA are from the 2000s.

Yeah, I'd call all of those codebases pretty old at this point.

Re:Carbon Language: An experimental successor to C++ by xoac on Tuesday July 19, 2022 @02:36PM (#32156026)
I mean a lot of these things rely on copying old code. AFAIK a lot of new games in bigger studios start by essentially copying the old engine into a new tree.
Re:Carbon Language: An experimental successor to C++ by mbrodersen on Tuesday July 19, 2022 @10:10PM (#32160527)
Nope. Ex. game developer here. New C++ projects and libraries are started every single day.
Re:Carbon Language: An experimental successor to C++ by mihaigalos on Tuesday July 19, 2022 @01:13PM (#32154865)
> I guess, unless you're into retro-gaming.

So new (same-)old development then?

Re:Carbon Language: An experimental successor to C++ by otabdeveloper4 on Tuesday July 19, 2022 @02:03PM (#32155608)
> Any serious new development today is done using more modern languages such as Rust

Uhm, no. Sorry, thanks for playing, try again.

Re:Carbon Language: An experimental successor to C++ by femtogram on Tuesday July 19, 2022 @04:38PM (#32157632)
robotics is primarily c++ and python. that may change to being rust and python, but it will definitely take some time.
Re:Carbon Language: An experimental successor to C++ by fancyfredbot on Tuesday July 19, 2022 @01:30PM (#32155089)
My impression as a CS grad is that very few computer science courses require you to learn C++.
Re:Carbon Language: An experimental successor to C++ by femtogram on Tuesday July 19, 2022 @04:40PM (#32157662)
what languages you learn at university highly depends on the specific school you are at, the professors, and which companies are donating the most money. it's certainly not a great representation of what is going on in the industry as a whole.
Re:Carbon Language: An experimental successor to C++ by xigoi on Tuesday July 19, 2022 @03:02PM (#32156370)
I'm studying Mathematical Informatics and we have C++ as the first language.
Re:Carbon Language: An experimental successor to C++ by germandiago on Tuesday July 19, 2022 @04:46PM (#32157732)
My impression is that C++ is used in the real world though. :)
Re:Carbon Language: An experimental successor to C++ by fancyfredbot on Thursday July 21, 2022 @08:41AM (#32178607)
Yes that is true but I'm responding to the up stream comment saying "you are required to learn it if you are studying CS". There is a common perception that computer science degrees are about learning things like C++ but my experience is that most emphasise more abstract skills like data structures, algorithms, complexity, formal program design, etc.
Re:Carbon Language: An experimental successor to C++ by germandiago on Thursday July 21, 2022 @03:15PM (#32183596)
Not at all. Computer science and engineering (I think this is different degrees in US but in Spain it was a BS + Master when I studied) is about algorithms, data structures, big O notation complexity in algorihtms, client/server architecture, hardware and assembly, understanding all the underlying math, networking, even HPC and advanced data structures when you keep choosing specialized subjects, but not learning a single tool for the sake of it for programming.

In fact, it is the least relevant part when you are studying. You learn tools better after you end the degree IMHO.

Re:Carbon Language: An experimental successor to C++ by tempest_ on Tuesday July 19, 2022 @03:39PM (#32156876)
It really depends on what bit of computer science you are learning.

C++ is definitely past its prime and has been surpassed in many areas by other languages but there are still a bunch of domains where it is the primary language.

Re:Carbon Language: An experimental successor to C++ by mbrodersen on Tuesday July 19, 2022 @10:13PM (#32160544)
How about almost all domains? Everything in the world runs on top of browsers/operating systems/drivers/VMs/networks/embedded systems etc. that are written in C/C++. Not to mention that the tools used to design chips and manufacture them are also written in C/C++. No other language comes even close.
Re:Carbon Language: An experimental successor to C++ by moltonel3x on Thursday July 21, 2022 @07:39AM (#32178168)
Having C or C++ somewhere in the lower levels of your stack doesn't make them the primary language for your domain. Other wise CPU microcode would be the primary language of every domain.
Re:Carbon Language: An experimental successor to C++ by ncmncm on Thursday July 21, 2022 @06:54AM (#32177834)
In fact there is plenty that can be expressed only in C++. A person making effective use of the power of the language finds anything else a huge step down.

Anyone not having fun when coding C++ is doing it wrong.

Re:Carbon Language: An experimental successor to C++ by jstimpfle on Thursday July 21, 2022 @12:37PM (#32181486)
Example of some well-written code that expresses things that can only be expressed in C++?
Re:Carbon Language: An experimental successor to C++ by sk0g on Saturday July 23, 2022 @11:06PM (#32209938)
I'm far from the most experienced in C++, but friend classes/functions do not seem to have a direct equivalent in any other language.
Re:Carbon Language: An experimental successor to C++ by int_19h on Monday July 25, 2022 @02:35PM (#32228903)
In C#, nested classes are effectively friends with their outer class, and it's used quite often in practice.

On the other end of expressivity, in Eiffel, every class member is declared as visible to specific other classes; if you want something to be public, you say that it's visible to ANY, which is the universal base class similar to e.g. Object in Java.

Re:Carbon Language: An experimental successor to C++ by ncmncm on Thursday July 28, 2022 @12:24AM (#32260471)
NB: Friend-this and -that are not among powerful features of C++.
Re:Carbon Language: An experimental successor to C++ by socialdemocrat on Tuesday July 26, 2022 @10:48AM (#32239066)
Because you don’t need them in other languages.