Rust: Programming a Guessing Game

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

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

  • @matthewsorg656
    @matthewsorg656 4 месяца назад +1

    At 19:30, why do you need to move the let mut guess inside the loop? Shouldn't the io.stdin().readline(&mut guess) be reassigning guess? It's unclear to me why you need to reallocate guess every loop.

  • @adityakadam024
    @adityakadam024 Год назад +1

    Is Mutable same as static in C/C++

  • @adityakadam024
    @adityakadam024 Год назад +1

    whenever i open VS code from command prompt all my prior saved workspaces get deleted. I've to add them back to workspace like every time. this happens only in case of cargo.

  • @awdsqe123
    @awdsqe123 2 года назад

    One little comment at 18:50, because of your excelent error handeling while parsing you wouldn't be able to close the program by typing a string, only by ctrl-c.

  • @JeremiKress
    @JeremiKress 2 года назад +1

    Nice beginner friendly tutorial. Subscribed!

  • @daanvanhove9657
    @daanvanhove9657 Год назад

    Thanks mate

  • @mariopaesdealmeidajunior5375
    @mariopaesdealmeidajunior5375 2 года назад

    Great job!

  • @GlobalYoung7
    @GlobalYoung7 2 года назад

    😊 thank you

  • @許至宇
    @許至宇 2 года назад

    What is the theme you applied to your VScode?

  • @DevonBagley
    @DevonBagley 2 года назад +3

    Oh.. that's weird, I thought the title was Rust programming: A guessing game. I was like 😐 Glad I am not the only one that feels like programming rust is a guessing game. Just keep refactoring until it compiles, and your previously simple elegant implementation is a bloated mess of spaghetti.

    • @oddmerlin9797
      @oddmerlin9797 2 года назад +2

      Honestly that mostly stems from not being familiar enough. I felt the same using C and trying to deal with pointers and references. I’m learning rust now and I’m in the exact same boat again

    • @DevonBagley
      @DevonBagley 2 года назад +1

      @@oddmerlin9797 With the majority of my experience being weakly typed languages where every variable is basically a reference pointing to an arbitrary value keeping all of the information about types and ownership in mind requires a lot of additional mental energy because you are doing a lot of work that other languages would do for you at the expense of performance or memory waste.