It seems like "write memory safe C" was the best technique in 1996 if you wanted any semblance of portability/performance.
It seems like "write memory safe C" was the best technique in 1996 if you wanted any semblance of portability/performance.
... still have multiple easily-uncovered memory issues.
Nobody writes safe C. Believing otherwise is delusional. This has been known for decades. But many believers still exist.
This is factually incorrect. You can write safe C code which is even correct according to some specification, as in "guaranteed bug free". This is not what most people do (or even know how to do) though.
There are lots of specification driven C applications, which rely on (1) the specification being bug free, (2) the application of the specification being bug free, and (3) the model or proof assistant for the specification being sound and bug free. Getting all three of those is historically very difficult.
It's a straw-man that's trotted out every time, and it's utterly meaningless beyond academic arguments. Even if it is true, it's not relevant for any practical purposes.
And I'll point to CVE-2015-4041 as evidence in my favor - that's a buffer overflow: https://www.cvedetails.com/vulnerability-list/vendor_id-72/p...
For all the code-golf insanity that Perl supports, it's an extremely effective language with a truly stunning degree of both flexibility and performance.
Common Lisp, depending on how you define memory safety.
If you remove the 'still exist today with meaningful market share', in '96 you had more options (e.g. Modula-2/2+/3 family).
There were others.
https://www.modula2.org/reference/isomodules/isomodule.php?m...
It also has pointer arithmetic, casting and sizeof in a SYSTEM module:
https://www.modula2.org/reference/isomodules/isomodule.php?m...
I'd actually like to see a Modula-2 example of, say, dynamically allocating an array object, which is dynamically sized. Because obviously Modula has better arrays which know their size, which a C program has to express all by itself with size fields and pointers.
I worked with Modula-2 quite a lot around 1990 but didn't do anything of the sort. I didn't know anything about any ISO standard or memory allocation functions provided thereby. A cursor search seems to indicate that it didn't exist until 1996; basically years after "peak Modula".
Unfortunately it still lacks meaningful marketshare though.
Meanwhile you can just use `parallel` in your shell scripts with very little ceremony.
Lua is great in many ways but looking at it in 2023, it's kind of stuck in the past.