Hi All! Welcome to the Reading Club for Rust’s “The Book” (“The Rust Programming Language”). This is week 1 (the beginning!!).

Have a shot at going through “the reading” and post any thoughts, confusions or insights here

“The Reading”

The Twitch Stream

What’s Next Week?

  • Chapters 3 and 4
  • Start thinking about challenges or puzzles to try as we go in order to get some applied practice!
    • EG, Advent of Code
    • Maybe some basic/toy web apps such as a “todo”
  • freamon
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    10 months ago

    I wondered the same, and tried use rand::rngs::ThreadRng but the compiler wouldn’t accept it, and suggest I use the trait instead. So it looks like the compiler can be helpful in identifying these things (and maybe traits are the first thing that Rust developers look for when reading the docs for a crate).

    (wrongness edited out and hopefully corrected in new comment)

    • maegul (he/they)@lemmy.mlOPM
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 months ago

      and maybe traits are the first thing that Rust developers look for when reading the docs for a crate

      Yep. Makes a lot of sense. Probably gotta start thinking in terms of traits at some point. I haven’t spun up any LSP yet but hopefully that can help surface these sorts of things.

      Still, at the moment, it does seem like a wrinkle in the usability of the language that you import something which implicitly underlies what you actually want to use.

      Also, Thanks!