News for hackers. Stuff that matters.
Re:Await in Rust by dleslie on Monday August 12, 2019 @11:53AM (#20676557)
Wouldn't it be desirable to replace async with sync, then?

I'd rather dirty the signatures of blocking/synchronous methods then of the rest.

Re:Await in Rust by dtech on Monday August 12, 2019 @12:47PM (#20677203)
Sync is still much more common than async. I'd rather write `await { httpCall }` than `blockOn { 1 + 1 }`
Re:Await in Rust by PJDK on Monday August 12, 2019 @12:12PM (#20676779)
That would make a lot of sense, but wouldn't be very practical to add in to an existing code base.
Re:Await in Rust by Cyph0n on Monday August 12, 2019 @12:09PM (#20676744)
Unlike JS, most languages, including Rust, are not async by default, so this would not make sense.
Re:Await in Rust by dtech on Monday August 12, 2019 @12:46PM (#20677196)
How is JS async by default?
Re:Await in Rust by steveklabnik on Monday August 12, 2019 @01:01PM (#20677373)
When people say this, they usually mean "a significant amount of things JavaScript is used for are asynchronous, and IO is virtually always asynchronous," rather than something more literal. The language has asynchronicity deep in its bones, even if it's not entirely made out of it.