Ownership

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

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

  • @qdwang-main
    @qdwang-main 6 ปีที่แล้ว +26

    The best animated explanation of ownership in rust.

  • @naughtrussel5787
    @naughtrussel5787 5 ปีที่แล้ว +63

    Great tutorial, but you really really should have published it with "Rust-lang" or "Rust" in title, so everyone could easily find it on youtube.

  • @iilugs
    @iilugs 2 ปีที่แล้ว

    This is really the best tutorial on ownership

  • @jimgerth6854
    @jimgerth6854 4 ปีที่แล้ว

    Hands down best rust explanation I‘ve come across, kudos

  • @nikhilbharadwaj8972
    @nikhilbharadwaj8972 4 ปีที่แล้ว

    Best pat of the video is the "Fire" animation.. lol... But on a serious note seriously appreciate the time and effort!

  • @pm71241
    @pm71241 4 ปีที่แล้ว

    Watched bit of this.
    Just wanted you to know that I think you are taking the perfect approach to teaching Rust, by doing ownership first. (and you're to the point and informative). Good job.

  • @johnboy14
    @johnboy14 7 ปีที่แล้ว +1

    Great series of videos. It would be great to see more

  • @zaccassini5384
    @zaccassini5384 7 ปีที่แล้ว +5

    Really enjoyed this. Thank you.

  • @shivanshoe
    @shivanshoe 3 ปีที่แล้ว

    The fact that this video has 36 comments is whats wrong with the world. I am in Software but not exposed to rust.Having watched a couple of videos of Niko Ive started knowing the depth of what they are trying to do here. So much control of resources with such nifty concepts.

  • @no_name4796
    @no_name4796 2 ปีที่แล้ว

    3:54 a java program which begins in void main(){}
    i know probably it was just to avoid confusing watcher but java main is actually "public statuc void main(String[] args)"

  • @gorbot2686
    @gorbot2686 7 ปีที่แล้ว +3

    You're great at explaining all of this, thanks a ton

  • @ronaldpannekoek6835
    @ronaldpannekoek6835 7 ปีที่แล้ว +7

    Thank you. It was verry helpful.

  • @ThePassle
    @ThePassle 4 ปีที่แล้ว

    Im here for the fire animation.
    Jokes aside, that was a really great explanation, thanks a lot!

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

    As an existing programmer, but a beginner to rust, it would have been much handier, and more intuitive, if there were not two types of variables - some that automatically get copied, and some that don't. Hopefully I will get used to knowing which is which.

  • @MrMaxiePL
    @MrMaxiePL 5 ปีที่แล้ว

    For example most interpreted languages do copy for most variables shared by arguments. E.g JS will copy values except objects.

  • @ChrisWalshZX
    @ChrisWalshZX 5 ปีที่แล้ว

    20:44 you explain how the compiler will warn you about not modifying a mutable variable, however if your input happened to be a string comprising completely of vowels (or an empty string), the function will still return without having modified output variable! This can only be found at runtime. Is this situation okay ? Thanks :-)

  • @bjkorb7272
    @bjkorb7272 3 ปีที่แล้ว

    That animation was fire

  • @kentwest8831
    @kentwest8831 3 ปีที่แล้ว

    I notice that the println! macro does not seem to take ownership of variables given to it. Special case?

  • @chinnichaitanya
    @chinnichaitanya 4 ปีที่แล้ว

    Thank you for the great content! I have a quick question, shouldn't we declare "mut" when shadowing a variable?

  • @rodelias9378
    @rodelias9378 3 ปีที่แล้ว

    Goat explanation!!

  • @AnirbanBasu
    @AnirbanBasu 2 ปีที่แล้ว

    Why does the call to println!() on line 35 not complain that the ownership to devowelized_name has already been transferred once on line 29? Is it because println!() is not a function but a macro and it does not take ownership like functions do as the video explains?
    Also, for Goal #2, how about changing line 11 to
    fn remove_vowels(name: &String) -> String
    and then passing an immutable reference to name on line 28 as
    let devowelized_name = remove_vowels(&name);
    Is this a worse than the way explained in the video?

  • @recklessroges
    @recklessroges 5 ปีที่แล้ว +1

    Would: fn remove_vowels(name: &String) -> String ... println!("Removing vowels from {:?} yields {:?}", name, remove_vowels(&name)); be considered bad/good/slow/unidiomatic ?

    • @Tr3Gee
      @Tr3Gee 5 ปีที่แล้ว

      Good question. I actually went this route to solve the problem and extra credit and would like to know the same thing.

    • @serxka
      @serxka 5 ปีที่แล้ว

      I’m also curious about that, to me it seems like using a reference would be quicker.

    • @theofelippe3728
      @theofelippe3728 5 ปีที่แล้ว +1

      I believe the reason he did the way he did is just to keep it simple, since '&String' makes use of 'shared borrow' which is a concept he talks about on a different video in the series.

  • @scottspitlerII
    @scottspitlerII 3 ปีที่แล้ว

    Rust is very powerful, but also feels very arcane and slow to write at the same time

  • @mozi_h
    @mozi_h 6 ปีที่แล้ว

    That puzzle was satisfying to solve

  • @Tyronnisos
    @Tyronnisos 4 ปีที่แล้ว

    This Video is amazing. Thank you for preparing my presentation :'D

  • @saaddahmani1870
    @saaddahmani1870 3 ปีที่แล้ว

    Thank you... So helpfull.. Great..

  • @124141hhhhfhf
    @124141hhhhfhf 7 ปีที่แล้ว +1

    extremely helpful, thanks so much!!!

  • @joel230182
    @joel230182 7 ปีที่แล้ว

    Nickolas, what software do you use to create these animations/video?

  • @bjugdbjk
    @bjugdbjk 2 ปีที่แล้ว

    Fantastic

  • @wy7128
    @wy7128 4 ปีที่แล้ว

    is this a legal concept or CS concept. i was looking for legal definition.

    • @hermannpaschulke1583
      @hermannpaschulke1583 4 ปีที่แล้ว

      This is about the Rust programming language, which has the concept of ownership.

  • @grokk-rock
    @grokk-rock 2 ปีที่แล้ว +1

  • @Lowkster
    @Lowkster 4 ปีที่แล้ว

    What editor is that ?

  • @gmt-yt
    @gmt-yt 4 ปีที่แล้ว

    Based on the "drop" animation, I wonder if Mr. Matsakis might be an ATHF fan?

  • @andrez76
    @andrez76 4 ปีที่แล้ว

    Please don't tell me this initiative has been discontinued. I've just decided to get into Rust and was really liking this material. Then I noticed the date. Has this series been moved elsewhere?

  • @AlecHalePletka
    @AlecHalePletka 5 ปีที่แล้ว

    Phenomenal video

  • @ananas-pro3359
    @ananas-pro3359 4 ปีที่แล้ว

    Крутое видео

  • @grrr1351
    @grrr1351 7 ปีที่แล้ว +3

    I thought it was gonna be about DRM.

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

    💛💚

  • @aspotashev
    @aspotashev 5 ปีที่แล้ว

    21:37 singing

  • @icbm7
    @icbm7 5 ปีที่แล้ว

    Why do you call them "simple types"? You seem to be avoiding calling them "primitive types". Is this intentional?

  • @bettertoaster
    @bettertoaster 4 ปีที่แล้ว

    Your description of a JVM garbage collector is outdated.