News for hackers. Stuff that matters.
Re:C constructs that still don't work in C++ by pjmlp on Monday May 25, 2026 @02:46AM (#48264119)
Except modern C also has plenty of abstractions, devs wrongly assume it doesn't.

Then get surprised when it doesn't map to the SIMD/SIMT NUMA machine their code actually executes on.

Re:C constructs that still don't work in C++ by uecker on Monday May 25, 2026 @03:02AM (#48264202)
There is not much real evidence for "devs wrongly assume" and as someone writing numerical code (clusters, NUMA, SIMD, etc.) I think C is still the ideal tool for this.
Re:C constructs that still don't work in C++ by pjmlp on Monday May 25, 2026 @07:49AM (#48265767)
Why should it be, the language doesn't expose any of it.
Re:C constructs that still don't work in C++ by uecker on Monday May 25, 2026 @10:34AM (#48267351)
Assuming you mean the standard does not provide features for numa and simd? It doesn't necessarily have to. I think it is not surprising that you seem always bewildered that people still use C (as per your comments), as it seems you fundamentally do understand neither standardization nor systems programming.
Re:C constructs that still don't work in C++ by pjmlp on Tuesday May 26, 2026 @02:57AM (#48276071)
I do certainly understand it, by the eyes of C++, Rust, Ada, Object Pascal, Modula-2, D.
Re:C constructs that still don't work in C++ by jstimpfle on Tuesday May 26, 2026 @06:31AM (#48277742)
Systems programming is not primarily about programming languages though...
Re:C constructs that still don't work in C++ by jstimpfle on Monday May 25, 2026 @03:13AM (#48264270)
such a strawman again... You don't want to be writing explicit platform specific SIMD most of the time. You just want to write a dumb function that doesn't do any non-obvious calls, doesn't cause thread contention, doesn't hide complexity, isn't going to be a nightmare to change later, no surprises.

I am talking about self-inflicted complexity that is entirely within the C(++) machine model. Avoid that complexity and you're pretty good already. Only drop down to concrete hardware arch level where it makes sense. But largely, the C machine model is still very much suited as a model for actual hardware. Writing straightforward obvious code allows you to stay in control of memory layout and the data transformation paths. It easily gets you within <<2x of what you could achieve with hand coded assembler for the >90% of the code that are pretty boring and straightforward. And obviously you couldn't get the work done in time when coding everything in assembler.

Re:C constructs that still don't work in C++ by pjmlp on Monday May 25, 2026 @07:51AM (#48265777)
So abstractions are desired then?

I have seen plenty of self inflicted complexity in C, starting in the golden age of Yourdon Structured Method, and all those libraries that replicate C++ basic features with preprocessor macros.

Re:C constructs that still don't work in C++ by jstimpfle on Monday May 25, 2026 @08:24AM (#48266029)
Most of these methods and ideas turned out to not work, neither in messy C libraries, nor in C++ or other languages.