04 Ownership & Borrowing | Rust Tutorials

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 มิ.ย. 2024
  • Check out the entire playlist here: • Rust Tutorials
    In this video, I will be covering the stack/heap memory model followed by Rust's Ownership system and borrowing system
    Find me elsewhere:
    Instagram: / jeff.no.zhao
    Github: github.com/kamiyaa

ความคิดเห็น • 16

  • @laviray5447
    @laviray5447 ปีที่แล้ว +11

    By far the most well explained video on youtube about rust ownership and borrowing. Showing a visual representation of what's happening to the memory was the most important part and it helped me understand everything.

  • @zapoyou2
    @zapoyou2 4 หลายเดือนก่อน

    I’m a few months into learning the programming world, and this is a massive help and explaining these basic concepts to me.

  • @SuperPatQC
    @SuperPatQC ปีที่แล้ว +2

    Thanks bud, that was the clearest explanation ive seen so far of the borrowing checker !

  • @aaryan6577
    @aaryan6577 3 ปีที่แล้ว +4

    Damn these are the best tutorials

  • @nicolascrochet4093
    @nicolascrochet4093 ปีที่แล้ว

    Amazed by this video. Thanks

  • @user-cq7yy8qw3i
    @user-cq7yy8qw3i 9 หลายเดือนก่อน

    very nice explanation. keep it up

  • @codemonk9
    @codemonk9 ปีที่แล้ว

    Great tut, thx

  • @int4_t
    @int4_t 8 หลายเดือนก่อน

    underrated

  • @tushartilwani9540
    @tushartilwani9540 ปีที่แล้ว

    Awesome!

  • @Ghasakable
    @Ghasakable ปีที่แล้ว +2

    Sorry I have a question about your explanation here, in 5:13min precisely, I thought the macro `println` is a function that will own s1, and it has its own scope, if that is correct, then s1 will be deallocated first, then s2, while you refer to the end of the scope by the end of the bracket? is my understanding correct? or something I missed here? again, I am very much thankful for the effort of making such an amazing explanation video. This will not change the fact of what you have stated, but just for my understanding, thank you very much.

    • @Ghasakable
      @Ghasakable ปีที่แล้ว +2

      I found the answer here: The macros print!, println!, eprint!, eprintln!, write!, writeln! and format! are a special case and implicitly take a reference to any arguments to be formatted. These macros do not behave as normal functions and macros do for reasons of convenience; the fact that they take references silently is part of that difference.

    • @IngridPuppet
      @IngridPuppet 10 หลายเดือนก่อน

      Thank you.

  • @eddyecko94
    @eddyecko94 3 ปีที่แล้ว +1

    Thanks

  • @nezman_x2080
    @nezman_x2080 2 หลายเดือนก่อน

    5:12 the code throws an error because S1 ownership passed down to S2 and the compiler will execute an error message.

  • @MOUNIROU60
    @MOUNIROU60 ปีที่แล้ว

    thnx for the video

  • @thanoscar8709
    @thanoscar8709 4 ปีที่แล้ว +2

    BIG NOOT!