A simplified model of Fil-C

47 points by fanf


andrewrk

If you have a language with a strong compile-time story, and the compile-time language is the same as the runtime language (for example, Zig), you could use a Fil-C setup for safe compile-time evaluation, even if runtime evaluation is unsafe.

Umm, what?

I'm interested in looking into making Zig's ReleaseSafe, or maybe an additional optimization mode, do the equivalent of Fil-C, but I think this comment is victim of a fundamental misunderstanding. Perhaps the author believes that compile-time code execution in Zig allows arbitrary code execution, but that is simply not the case. You can't pointer reinterpret, make syscalls, or otherwise cause any side effects on the host.

I hope this blogger's understanding is not informed by that hallucinated LLM-generated blog post, that I won't link to, and that no self-respecting person replying to this comment will link to, that implied that Zig code at compile time could run arbitrary code on the host.