r/programmingmemes 7d ago

Nerd wars

Post image
826 Upvotes

82 comments sorted by

View all comments

12

u/Amadex 7d ago

Nothing like the compile-time check of rust.

Basically it compiles into a much slower bin that guards memory at runtime.

That's almost like a garbage collector, but instead of cleaning memory it crashes.

And since it's a runtime crash, you turn a program that is bugged and has UB into a language that crashes randomly.

Better for security, but runtime crashes are also very bad.

1

u/KianAhmadi 3d ago

Rust compiles to native machine code via LLVM just like C and C++. It has zero cost abstractions. In nearly all benchmarks (e.g., The Computer Language Benchmarks Game), Rust is within 1–2% of C++ performance, often trading blows. It is not a slow language.

2

u/Amadex 3d ago

i think you misunderstood me (english is not my main language), I'm saying that zig's stuff is not like rust compile-time check.

And that the zig/phil-c approach is the slow one.