News for hackers. Stuff that matters.
Re:Rust’s async isn’t colored by 1f60c on Thursday March 11, 2021 @06:18AM (#26422811)
Having to use an async immediately invoked function expression in Node scripts is kind of a pain, but I agree.
Re:Rust’s async isn’t colored by cpfohl on Thursday March 11, 2021 @07:41AM (#26423368)
I haven't found it painful, but i avoid iife in favor of a named function I call...

``` async function main() { await stuff(); }

if (module === require.main) main(); ```

Re:Rust’s async isn’t colored by infensus on Thursday March 11, 2021 @10:11AM (#26424817)
Top-level await is available in ES modules in Node without any flags since 14.8.0