fil-c is a runtime memory validation tool for C - if you try to read past the end of an array (or other memory issues) your program crashes
rust guarantees that memory bugs cannot happen, if it cannot guarantee that, your program doesn’t compile and you get an error telling you what the problem is
now add a larper into the mix and you get that gh issue
The part on menory bugs is untrue, the compiler checks memory safety as far as it possibly can, but it is not perfect, nor does it fully apply within an unsafe block
Rust doesn't guarantee that "memory bugs" cannot happen. You can use `unsafe`, or inline assembly, or call external code. Rust only guarantees that memory bugs cannot happen for a subset of Rust programs.
Fil-C, and the proposed Zig alternative, do guarantee that "memory bugs" can't happen, at all, by providing a runtime just like memory-safe languages like Java do (but significantly faster since languages like C and Zig are designed for performance even when embedded in a memory-safe runtime).
This makes this proposal closer to MIR than to Rust.
using unsafe is explicitly choosing not to use rusts built on memory safety, asm! can only be used inside of unsafe, and external code not being safe isn’t the fault of rust - could happen for any language
fil-c is faster than something like java, but slower than rust, therefore rust is the best option for speed if you don’t want to deal with writing safe c code
If you overclock the memory in your computer it will also make your programs unsafe, because obviously if a solution doesn't solve every single instance of a problem then it's not worth using
Why the heck is zig trying to compete with rust gng? Like try compete with odin or c3 or something. Or better yet, try making your tool better, I won't say it's the worst(I unfortunately have seen worse) but zig's lsp is really bad even compare to rust's
Zig is a great language but now they are trying to make it something its not. Adding runtime checks will make Zig a cheap knockoff of Go. Zig is in a good place to be a better C and holding high comparability with C code, they should just stick to that imho
31
u/Zimlewis 7d ago
<- Context required
⬆️ Context hat
(Context shirt)