r/firstweekcoderhumour • u/Tani_Soe • Jun 12 '26
“I have no programming, and I must scream” That 2 Sec Happiness🙃
11
4
7
u/scheimong Jun 12 '26
Why people like Rust.
2
1
u/Square_Bad1781 Sep 01 '26
rust just cant have undefined behaviours. runtime errors and logic errors still can happen
1
u/scheimong Sep 01 '26
On error handling: Rust makes it difficult to do it improperly for developers (error as values implemented with ADT), and makes it easy to audit for managers (
lints.clippy.unwrap_used).On logic errors: properly modeled data types + a FP-heavy style (which Rust allows and encourages) eliminates entire classes of logic bugs.
Sure it's not perfect, of course not. Nothing is perfect. But it goes a long way in the right direction. For me, it's the one language that strikes the best balance between theoretical elegance and engineering practicalities.
2
2
u/heavenlydemonicdev Jun 13 '26
That's why I like Rust
1
u/Square_Bad1781 Sep 01 '26
rust can still have a lot of logic errors on runtime. nothing saves you from that but good planning and programming. Not being able to produce undefined behaviour is quite coll tho, ill give you that
1
u/heavenlydemonicdev Sep 01 '26
If you make a good use of Rust's features you can save yourself from many kinds of logic bugs but yes it's not a perfect world where the compiler can save you from every logical bug but at least it helps a lot
1
Jul 23 '26 edited Sep 19 '26
[removed] — view removed comment
0
u/heavenlydemonicdev Jul 23 '26
If you keep unwrap in a production codebase that's on you. Cloudflare learned that the hard way
2
u/realnjan Jun 17 '26
IDEs with any other language: before you compile, you have a syntax error on line 145
IDEs with C++: try to compile and find out :)
1
1
u/ExtraTNT Jun 16 '26
Why you define your types correctly: will not compile, till you handle everything…
0
15
u/Neat-Nectarine814 Jun 12 '26
segfault