Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
donkulator3081291d@jestdotty When I first read that, I thought yes, the second one with the or operators is much nicer.
But now I've thought about it for a few minutes, I prefer the first one. The act of trying to unwrap and moving to the next thing if you can't is made explicit, you can see what's going on. Now the second one looks confusing.
I find this happens a lot with rust.
Wtf is that -> actually that's ok -> ooh that's a good idea -> that's better than C#. -
donkulator3081291d@kobenz Some years ago, I googled "what the fuck is a monad", and discovered to my delight that someone had written an article with that exact title.
I read it then, and I've just re-read it now, and I still don't know what the fuck a monad is. -
kobenz868289dI think I've read that one, @donkulator. This one's shorter, faster and easier
https://adit.io/posts/...
Related Rants
can option pls override or operator
this is stupid
say no to
let branch = branch.unwrap_or(config.branch.unwrap_or("something".to_string()));
say yes to
let branch = branch || config.branch || "something".to_string();
rant
rust
option