Oh no, the Try trait is not stable yet. https://doc.rust-lang.org/nightly/core/ops/trait.Try.html …
-
Show this thread
-
Speaking of Try, just bumped into the `try!()` macro. Something I've pretty much only heard of, but don't think I've ever used it? https://github.com/alexcrichton/git2-rs/blob/master/examples/log.rs#L52-L53 … Wonder if this will be similar for Futures a few years down the line, heh. Async/await everywhere will be interesting.
1 reply 0 retweets 1 likeShow this thread -
Replying to @yoshuawuyts
try!() is an old macro I haven't used in years. It was noisy syntax so I'm glad we switched to ?. When it comes to await!() I'm not sure it's as noisy so I'm not sure what syntax we would adopt to make something await, or how we would resolve operator precedence if it's a Result
1 reply 0 retweets 0 likes -
Replying to @mgattozzi @yoshuawuyts
So for example how would we resolve something like let x = await my_future?; For now at least let x = await!(my_future)?; makes sense. It'll be interesting to see what we come up with :D
1 reply 0 retweets 1 like -
Replying to @mgattozzi
Haha, I meant more of "async/await" as opposed to Futures' .map_err() + Task<Err= "", Output = ""> and friends :P As to the latter: I agree! Def feel like we'll be able to resolve it for sure! `await!(my_future)?` everywhere until then! :D
1 reply 0 retweets 1 like -
Replying to @yoshuawuyts
:D It'll be interesting to look at this like a year from now and see where we're at!
1 reply 0 retweets 1 like
Hahaha *cue yearly blog post*
-
-
Replying to @yoshuawuyts
speaking of which I still need to release year 3 that's a bit late at this point...
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.