Difference between try
and sequence
#410
-
I've read the documentation for the two several times, and the differences that I've spotted are:
How far am I right, and are there any more differences? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi 👋
That is correct and it's because
It can be but it won't be awaited so accessing a state right after a
The fundamental difference is that |
Beta Was this translation helpful? Give feedback.
-
No longer relevant, as these constructs were removed in v0.17.0. |
Beta Was this translation helpful? Give feedback.
Hi 👋
That is correct and it's because
try
is synchronous.It can be but it won't be awaited so accessing a state right after a
next
call will return the previous value.The fundamental difference is that
try
is synchronous whereassequence
is asynchronous. Intry
results (Result(error, value)
) are unboxed, insequence
promises (Promise(error, value)
) are awaited and unboxed as well.