|
|
|
|
|
by slt2021
1270 days ago
|
|
I learned programming at school in Pascal and didn't have troubles with memory safety. FreePascal/Delphi has good standard library to work with strings and dynamic arrays and objects, and as long as you follow very simple convention with TObject.Create() and TObject.Free; you won't have memory safety problems. I didn't really have a need to work with pointers and do pointer math in Pascal, because language itself provided facilities to work with heap objects safely. Also standard Pascal compiler added array bounds safety and many other checks, and you would easily find these errors during program execution (there wont be a silent exception). Also because Pascal compiler is LL(1) single pass compiler, you could easily do a cycle of: edit code, compile (<1 second on 333Mhz Pentium-II), and run. That compiler enabled developer experience of like modern Python/Javascript Unlike C++ which spent enormous time evaluating macros, compiling, linking, etc |
|
Is this the same as how in C, as long as you follow very simple convention with malloc() and free() you won't have memory safety problems?