Instead, it's a bespoke, artisanal language feature that composes poorly w everything except Optional.
Conversation
I disagree. Experience in Haskell shows that monadic types are awful for composing effects.
1
4
I don't understand how Optional and Result are fundamentally different here.
1
2
My point is less about The Monad and more about being able to treat maybe-errors as a value.
1
'try?' doesn't foreclose on the ability to capture a maybe-error into a value.
1
It increases the inertia of Optionalish errors rather than Eitherish errors (i.e., an afterthought).
2
I want the bad path to receive as much compositional power and valueness as the good path.
3
3
The ability to abstract over 'throws' is admittedly weak. I hope we'll improve.
3
7
Throwing closures are definitely still very awkward, esp w/ async.
3
…then you try to compose with sequence operations and end up with Array<Promise<Result<T>>>...
1
1
Replying to
Replying to
You're probably really trying to asynchronously either produce an Array<T> or throw.
1
1
Gotcha. And now you’re stuck `join`ing around until you get the `Promise<Result<Array<T>>` you wanted.
2
2
Show replies



