Fixing C's Biggest Mistake

Walter Bright newshound2 at digitalmars.com
Sun Jan 1 20:04:13 UTC 2023


On 12/31/2022 10:33 AM, monkyyy wrote:
> When adr is 
> making a video game on stream and defines a vec2 with default initialized 
> floats; it's a video game it should be fail-safe and init to 0 rather than have 
> him take 10 minutes on stage debugging it. Different situations can call for 
> different solutions, why is safety within computer science universally without 
> context?

You're right that a video game need not care about correctness or corruption. I 
remember the Simpsons video game where there was a sign error (I infer) in the 
rendering that caused one to see the back side of the renderings. It was quite 
funny. Had to reboot it to get it working again.

Unfortunately, at some point the language has to make decisions. The tradeoff 
made was to value correctness more than convenience. After all, professionals 
using it for financial programs, engineering programs, scientific data analysis, 
etc., need correctness. Any programs that manage a device that people rely on 
needs correctness.


More information about the Digitalmars-d mailing list