3 ms·
My biggest issue with the whole "function colour" thing is that many functions have different colours. Like, these two: fn foo() -> String fn bar() ->
by Measter 1y ago
My biggest issue with the whole "function colour" thing is that many functions have different colours. Like, these two:
fn foo() -> String
fn bar() -> Result<String, Error>
I can't just treat `bar` the same as `foo` because it doesn't give me a String, it might have failed to give me a String. So I need to give it special handling to get a String.
async fn qux() -> String
This also doesn't give me a String. It gives me a thing that can give me a String (an `impl Future<Output=String>`, to be more specific), and I need to give it special handling to get a String.
All of these function have different colours, and I don't really see why it's suddenly a big issue for `qux` when it wasn't for `bar`.
- echelon 1y agoExcellent retort!