logoalt Hacker News

littlestymaaryesterday at 10:58 AM2 repliesview on HN

I don't think anyone believes the “if it compile it works” phrase literally.

It's just that once it compiles Rust code will work more often than most languages, but that doesn't mean Rust code will automatically be bug free and I don't think anyone believes that.


Replies

emilbrattyesterday at 11:22 AM

Yeah, even the official Rust book points it out and if my memory serves me right (not punintended) also gives an example in the form of creating a memory leak (not to be confused with memory unsafe).

show 1 reply
embedding-shapeyesterday at 11:59 AM

There are definitively people in the ecosystem who peddle sentiments like "Woah, Rust helps so much that I can basically think 'if this compiles, everything will work', and most of the times it does!", and that's the confusing part for many people. Examples found in 30 seconds of searching:

- https://bsky.app/profile/codewright.bsky.social/post/3m4m5mv...

- https://bsky.app/profile/naps62.bsky.social/post/3lpopqwznfs...

show 5 replies