Traits now support async fn and -> impl Trait (with some limitations), the compiler got faster, version = in Cargo​.toml is now optional, and many small functions have been stabilized!

  • xav
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    You could argue that C++'s new is Rust’s Box::new, and delete is replaced by RAII. Same concepts but way better ergonomy.

    • arades@feddit.ch
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      box::new is pretty directly analogous to std::make_unique (factory for unique_ptr), in general rust’s heap allocating types map to c++’s smart pointer types, which are basically universally recommended over raw new/delete. So another column where rust just gives you the one best C++ feature where it still has 4 supported versions.