|
|
|
|
|
by raverbashing
3300 days ago
|
|
How about we start the retirement of C as it is a liability more than an asset at this day and age How about we only use languages that (as you propose) work with memory slices not naked pointers and where the concept of a null pointer does not exist How about we only operate on memory slices after checking boundaries |
|
You can think yourself superiour and turn up your nose, but the fact remains that many people have perfectly good reasons to write and maintain C. Your haughty commentary has no impact on that.
You may think that bounds checking is the answer to all situations, but if you're writing a realtime system, there's often no point in running the program if it can fail from an out of bounds read or write anyway. In a flight control system, or an ECU, there is often nothing productive about crashing. You need to verify your pointer logic, instead of hoping your program will crash.