News for hackers. Stuff that matters.
Re:We need to seriously think about what to do with C++ modules by c0balt on Sunday August 31, 2025 @05:49PM (#45087419)
I'm pretty sure a lot of fields would disagree with you. Last I checked game programming, OS development, embedded development and more were deeply invested in either C or more often C++, especially when RT tasks were involved or vendor-provided compilers are required.

Rust just doesn't have close to the same type of adoption/support yet, especially when considering various embedded platforms.

Re:We need to seriously think about what to do with C++ modules by holowoodman on Sunday August 31, 2025 @06:04PM (#45087524)
There is a big big difference between C and C++. The article is about C++, which is being replaced by Rust imho. C is different, and far more frequently used for embedded or OS development. Don't know about games, but last I looked, stuff like unity was C#, so something else yet again.
Re:We need to seriously think about what to do with C++ modules by grg0 on Sunday August 31, 2025 @06:27PM (#45087661)
Game engines (the thing that C# runs on top of) are written in C++. As is the C#/.NET runtime. As is anything that requires careful management of memory for performance. Application code is perfectly reasonably written in managed languages, but not so for the things that run underneath.
Re:We need to seriously think about what to do with C++ modules by ShinTakuya on Monday September 01, 2025 @07:44AM (#45091915)
There's nothing inherent about C++ that makes it more suited than Rust for game engines though, Rust supports careful management of memory too. Of course, nothing besides inertia (i.e. Libs, existing code, etc.). And that of course is more than big enough of a reason to stick with it.
Re:We need to seriously think about what to do with C++ modules by grg0 on Monday September 01, 2025 @01:38PM (#45094835)
Rust supports careful management of memory at the expense of unsafety, at which point that particular area of the code offers no benefit over C/C++, let alone value in a rewrite. There is no type system for reinterpreting bits of memory.

And for the safe parts, the posts that I've read from people who have spent a non-trivial amount of effort with the language do not paint a clear picture either on whether there was really a benefit to the language overall.

So to say that "the world has moved on" in light of all of this is pure hubris.

Re:We need to seriously think about what to do with C++ modules by jonathrg on Sunday August 31, 2025 @06:20PM (#45087627)
C++ is widely used in embedded. Most compilers support it. Usually you turn some things off (e.g. -fno-rtti, -fno-exceptions) and try to stick to some sane subset of the ++.
Re:We need to seriously think about what to do with C++ modules by com2kid on Monday September 01, 2025 @02:26AM (#45090018)
C++ in embedded is basically C with classes. It is a nice simple language and often doesn't even include templates (or if it does they are very simple data structures that are not even heap allocated).

C++ as C with classes is a pretty good language!

Re:We need to seriously think about what to do with C++ modules by drwu on Sunday August 31, 2025 @06:30PM (#45087680)
It is a pitty that

- GCC switched from C to C++

- CUDA switched from C to C++

But I can understand the decision, and at that time , C++ frontend features and libs were a little bit less horrible.

Re:We need to seriously think about what to do with C++ modules by deeznuttynutz on Sunday August 31, 2025 @09:36PM (#45088647)
It's a pity?

Please explain in detail how alternatives would have worked better for GCC and CUDA. Also, if you could share some historical context about how those alternatives could realistically have been implemented at the time, that would be helpful too.

I love to hear all the "would've" and "should've" scenarios.

Re:We need to seriously think about what to do with C++ modules by j16sdiz on Monday September 01, 2025 @05:19AM (#45090994)
Last time I checked, MSVC don't want to implement C99/newer and instead focus on C++.
Re:We need to seriously think about what to do with C++ modules by drwu on Monday September 01, 2025 @07:10AM (#45091701)
To be fair, MSVC has the most C99 stuffs. What is mainly missing for porting (my) programs is the native complex number. But we have Intel compiler for free on Windows, which is fully compatible with the C/C++ standard and produces faster binaries.

The C++ frontend of MSVC handles (the common) compiler-specific language extensions differently than the other compilers. Besides, its pre-processor behaves differently too. It is now good that there is a clang frontend for MSVC.

Re:We need to seriously think about what to do with C++ modules by feelamee on Sunday August 31, 2025 @10:01PM (#45088766)
haha, fun fact - Unity is C++ code base. You need to look deeper