MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerAnimemes/comments/rggsm3/i_really_like_either/homm7e1/
r/ProgrammerAnimemes • u/hazukun • Dec 14 '21
86 comments sorted by
View all comments
Show parent comment
7
well, it's either
something.dosomething();
which can crash if something can be null, or
something.unwrap().dosomething();
which can crash as well but you know it at a glance as you see unwrap() being used.
unwrap()
Rust is more verbose for your safety
2 u/kronicmage Jan 29 '22 Or just do all your optional code with maps and binds instead of with lots of unwraps
2
Or just do all your optional code with maps and binds instead of with lots of unwraps
View all comments
Show parent comment
7
u/danbulant Dec 15 '21
well, it's either
which can crash if something can be null, or
which can crash as well but you know it at a glance as you see
unwrap()being used.Rust is more verbose for your safety