How does rust handle errors then? Just uses the Result type? I figured they wouldn’t implement a try/catch since the Result kinda handles it, but I am a noob so I’m not sure
As far as I'm aware, Rust has two main ways to deal with errors. Result<T, E> for recoverable errors (which can be handled by the developer, allowing them to determine whether to continue the program or force an exit), and panicking for non-recoverable errors (which always result in the program exiting immediately).
109
u/Yoghurt42 Jul 23 '21
Fun fact: Rust currently uses yeet as a placeholder for throw/raise to avoid bikeshedding while the feature is being finalized
10
u/ShitTalkingAssWipe Jul 23 '21
thank you, adding this to my templates
8
u/LePootPootJames Jul 24 '21
The busiest airport in the U.K.
5
u/SaltyWolf444 Jul 23 '21
I don't know too many programming languages, could you tell me which language is it in?
3
u/[deleted] Jul 23 '21
Put that shit on a t-shirt!
1
u/UrAccountGotHacked Aug 06 '21
Hey man i would like to talk to you in DMs. How can I?
0
u/[deleted] Jul 23 '21
[deleted] — view deleted comment