4 ms·
Pascal was(is?) not memory safe in that it still allows use after free. It was safer than C though thanks to making it more difficult to do weird casts or point
by praptak 4y ago
Pascal was(is?) not memory safe in that it still allows use after free. It was safer than C though thanks to making it more difficult to do weird casts or pointer arithmetic. These were normal in C code, in Pascal rather something you go out of your way to do.
Also I think the arrays had bounds checking?
- pjmlp 4y agoThat is the usual excuse to keep writing C code, because alternatives aren't 100% bullet proof, we just keep using the unsafe one. Yes, it suffers from use-after-free, lets ignore everything else that is safer than C. Bounds checking are enabled by default and if one wants to shoot themselves on the foot there is always {$R-}.