4 ms·
> One is they make your functions colored I don't get what's so bad about "colored" function. That color is just about the return type of the function. How do
by varajelle 6y ago
> One is they make your functions colored
I don't get what's so bad about "colored" function. That color is just about the return type of the function.
How do you return an error from a function that does not return a Result? You must call unwrap (panic) or change the colour of your function by changing the return type to Result and fix all the caller.
Similarly, if you want to use a future from a non-async function, you either call `block_on(...)`, or you change the return type to a future by marking the function async.
I don't think it is that bad. That's just the way explicitly typed programming languages work.
- vips7L 6y agoI think you've made me realize why I don't enjoy Rust. Every function is colored.