@440bx
just a flame war between Pascal and C/C++ ...
It certainly isn't my intention to start a flame war between Pascal and C++ particularly when I very strongly dislike C++. I would not enjoy defending that language but, credit has to be given where it is due, even in cases like that.
@AlexK
Personally, I believe that programming languages shouldn't manage memory. They should not even attempt to manage memory. That's what the programmer is for.
All the "facilities" (honestly, I consider them _gimmicks_) languages have added to manage memory to be highly counter productive because they promote programmer ignorance.
Managing memory isn't hard when it's done right. When it's not done right, all the "facilities" languages provide still don't compensate for all the problems poor memory management causes.
I don't have anything against making a language more capable, that is, enable the language to catch programming errors but, the thing that bugs me about this thread is that C, C++, FPC, Delphi are nowhere near anything that can be remotely considered memory safe.
I am close to convinced that it is not possible to create a totally memory safe language for any language that allows dynamic memory allocation. Once memory can be allocated then, pointers exist, pointer arithmetic may exist (quite convenient to have it), pointers may point to a block that _used_ to exist, a nill pointer may be inadvertently de-referenced. I don't believe it is possible for a language to guard against all those problems in a way that does not create an unacceptable number of hassles as a result.
Supposedly, C# and Java are memory safe. I looked into C# and it didn't take long before I decided there was _no way_ I was going to put up with all the language's and environment idiosyncrasies to "gain" a slower program, dependency on a monstrous library and limitation of how I can use O/S facilities because some APIs may "offend" poor C#'s sensibilities. Great language to get a listbox with checkboxes, for something useful, I find it very unconvincing. (VS Studio is reportedly partly coded with C# and it is a performance dog and a memory hog.)
The story with Java is similar. Anything that resembles a capable program is slow and clunky.
They are nice Darmouth BASIC descendants.
I'll check out that sound null safety.
Thank you for the link Alex.