Author: Marin Ivanov Date: To: dng Subject: Re: [DNG] I have to cancel my Rust presentation for 3/4/2026
Hi Didier,
On Sun, 22 Mar 2026 09:55:28 +0100
Didier Kryn <kryn@???> wrote:
> I tend to think that it's the language which allows or not
> memory-unsafe constructs. The compiler enforces the language, nothing
> less and nothing more. Or the compiler defines another language. Am I
> mising something?
My argument is that memory-safety is a property of the program. As I've
already given the example, every compiled memory-safe (Rust) program
can be disassembled and translated to C.
The Fil-C compiler allows you to use plain C / C++ and it produces
memory-safe programs, at the expense that it adds a runtime and it adds
overhead.
A restrictive language is a valid way to guide the compiler into making
optimised code. That does not make the language memory-safe, it just
makes it better at producing memory-safe optimised programs.
There is a valid subset of C programs that are memory-safe, therefore
there could be a tool that consumes arbitrary code and converts it to
memory-safe one. I'd argue that it could be done for assembly, as well.