News for hackers. Stuff that matters.
Re:A Reply to “Let’s stop copying C” by WalterBright on Sunday January 26, 2020 @02:08AM (#22150903)
> But the political problems are huge.

That's true. But there are no technical problems with it, not even backwards compatibility problems.

Re:A Reply to “Let’s stop copying C” by Gibbon1 on Sunday January 26, 2020 @06:17PM (#22155554)
I feel like the resistance is people think pointers are C's secret sauce. Reality is the only advantage is it makes it easy to write bran damaged unopimized compilers for C. Which no one does. I remember back in the 90's my boss gave me shit for using array indexes instead of pointers. Being a brat I looked at the assembly and there was no difference.

Ditto the cultural proscription on passing/returning small stucts by value. In practice it's no worse than passing the arguments separately. And likely easier for the compiler to optimize around.

Re:A Reply to “Let’s stop copying C” by Animats on Sunday January 26, 2020 @09:37PM (#22156473)
Ditto the cultural proscription on passing/returning small stucts by value.

Which really should be a compiler decision. Depends on the target CPU. If you pass something as const ref, the compiler should copy it if that's faster. For AMD64, it probably is. If something was just written, it's in the L1 cache and is really cheap to copy. On-chip data buses today can be as wide as 64 bytes. Anything not bigger than that is better copied.