4 ms·
Not really. Standard Pascal's dynamic features were barely present, but even they allowed dangling references to exist. And all practical Pascal clones (e.g. O
by cyberax 2y ago
Not really. Standard Pascal's dynamic features were barely present, but even they allowed dangling references to exist.
And all practical Pascal clones (e.g. Object Pascal) had to grow constructor/destructor systems to cleanup the memory on de-allocation (or they went the garbage collection route). So they were on-par with C++ for safety.
Ada is similar. It provided safety only for static allocations with bounds known at the compile-time. Their version of safe dynamic allocations basically borrowed Rust's borrow checker: https://blog.adacore.com/using-pointers-in-spark https://blog.adacore.com/using-pointers-in-spark
- pjmlp 2y agoNo one used Standard Pascal, just like everyone embraces their Compiler C extensions and many of them are blissfully unaware their code fails to compiler under strict ISO C conformance mode. We are beyond Ada 83, Controlled Types and SPARK exist, and Rust also does runtime bounds checking, so what.