2 ms·
The "function color is a problem" people invented a construct that amplifies the seriousness. It's not really a big deal.
by echelon 1y ago
The "function color is a problem" people invented a construct that amplifies the seriousness. It's not really a big deal.
- Measter 1y agoMy 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!