News for hackers. Stuff that matters.
Re:Copying data is wasteful, mutating data is dangerous by gowld on Friday January 10, 2020 @09:52AM (#22011286)
Explicitness is nice when you are building spacecraft, be but it has a real human cost. I'd rather not write all that stuff, and let my static or dynamic analyzer warn me about potential hotspots non-optimizable code.

Best-effort is fine if it's run an ecosystem where code changes are tested before deployment, which is everywhere performance matters.

Re:Copying data is wasteful, mutating data is dangerous by logicallee on Friday January 10, 2020 @06:48PM (#22016827)
Let's say someone includes a line

48362/37277295;

That's a no-op. (Some rational value you're not using - it's not even assigned to a variable name).

The compiler might warn you about it.

But do you think it should be allowed to just remove it - not even create the op?

Regardless of what the standard says, I'd expect the answer to be "sure."

What do you think?