3 ms·
Ada. 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 (
by kjs3 4y ago
Ada.
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.
- kazinator 4y agoISO Modula 2 has malloc/free-like routines, which you can easily misuse. https://www.modula2.org/reference/isomodules/isomodule.php?m=STORAGE.DEF 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=SYSTEM.DEF https://www.modula2.org/reference/isomodules/isomodule.php?m...
- kjs3 4y agoWhich you don't have to use. Just like you can turn of Ada checks at compile time, leading to things like the Ariane-5 cockup. And Rust has 'unsafe', which as I understand allows you to do interesting things. So it's probably fair to say they all give you a footgun of some calibre, but you really have to want to take your foot off to use them.
- kazinator 4y agoAll sorts of useful problem domains need dynamic allocation; you can hardly avoid using it at some point. 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".