this post was submitted on 28 Dec 2025
396 points (95.6% liked)
Programmer Humor
33320 readers
1310 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
- If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Go and Python and Typescript all have their own footguns.
I assume Rust is the same, but haven't used it personally to see
Rust is the foot gun, it's so perfect that you genuinely cannot just sit down and type out what you need.
Skill issue
- sincerely, someone making a DST crate
EDIT: To clarify...
There are some things that are only doable on nightly Rust (like specialization, const fn in traits, etc.) and the reason for that is to avoid future issues. In that regard, Rust will not be as good as C++... at least until those get stabilized.
Some of the nightly functionality (like
ptr_metadata) can be achieved withunsafecode and it's fine to do that, as long as it's only done when necessary and it's properly documented.It's okay to want to use C++, but that language has it's own issues and footguns (virtual destructors, "move semantics", C-style casts, header files and more) that Rust wants to avoid.
EDIT 2: Specialization is also kinda doable with deref coercion, but that's another can of worms I don't wanna open here.
EDIT 3: And if I had to mention some of Rust's footguns:
unwrappanics, which isn't bad in and of itself, but it's short so you'll probably want to use it instead of other error handling methods (see recent Cloudflare outages)unsafefunctions implicitly allows usingunsafeoperations (fixable by adding#! [deny(unsafe_op_in_unsafe_fn)])For my own Rust project I require myself to have a comment for every unwrap call that explains why that unwrap will never panic. For everything else I let the function return an error, with help of the anyhow crate and error contexts.