Let's Learn Rust: Programming A Guessing Game

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • We continue our Rust learning journey with a practical guessing game example. This introduced us to a lot of new syntax and terminology that we'll build upon later. This was a great episode and I really learned a lot!
    Follow along with us at: rust-book.cs.b...

Комментарии • 7

  • @JakeCallahan
    @JakeCallahan  10 месяцев назад +1

    There's a lot of new concepts introduced in this chapter, do you have a favorite? I really like what I'm seeing with the match expression so far, but I'm also looking forward to writing macros when we get there!

  • @OgMaciel
    @OgMaciel 10 месяцев назад +1

    I agree with Bruno. As always, you show great didactic skills and make it very user friendly 😊

  • @Alcamore
    @Alcamore 10 месяцев назад

    Really enjoying this so far, looking forward to the next one!

  • @rochacbruno
    @rochacbruno 10 месяцев назад +1

    Great video! I really like the way you gradually explains each new block of code.

    • @JakeCallahan
      @JakeCallahan  10 месяцев назад

      Thanks, Rust is pretty interesting so far and this chapter has me excited to learn more!

  • @omg33ky
    @omg33ky 10 месяцев назад

    I already know all of this since I've been working with rust for quite a while but it's quite fun seeing you learn the language.
    My favorite thing about rust is the matching and enum handling since it doesn't allow you to make an error without knowing it. There are no exceptions or cases that you won't know about, even if you just do the .expect or unwrap method on them.
    Just a note here. The .expect() thing is something that is great while prototyping and some other cases but there is only a small set of cases where I find it acceptable to use it in library code.
    The problem with it is that any program that calls your library won't really be able to do anything about it when it happens and it just kills the whole program. So in library code I strongly suggest using the Result or the Option enum (It will be explained to you later on too).
    Just as a side note and have fun learning.

    • @JakeCallahan
      @JakeCallahan  10 месяцев назад

      Thanks, and that's a great tip for expect. You now have me eager to see the better way to do error handling in Rust.
      More insights like these as we go along this series would be fantastic!