messy Result type just seems like a case of something that should’ve been handled already (or properly propagated up).
My point was that without flattening, “provide context and propagate” vs. “directly propagate” is always explicit and precise, and is obviously already supported and easy to do.
Use with functional chaining, as pointed out by others, wasn’t lost on me either. I’ve been using Option::flatten() for years already, because such considerations don’t exist in that case.
Yes. Note that I’m replying to this:
My point was that without flattening, “provide context and propagate” vs. “directly propagate” is always explicit and precise, and is obviously already supported and easy to do.
Use with functional chaining, as pointed out by others, wasn’t lost on me either. I’ve been using
Option::flatten()
for years already, because such considerations don’t exist in that case.