steveklabnik / rust-in-ten-slides

Short presentations about Rust syntax + concepts
https://steveklabnik.github.io/rust-in-ten-slides/
72 stars 6 forks source link

Explain the ownership and borrowing using a real-world example #4

Open k0pernicus opened 6 years ago

k0pernicus commented 6 years ago

For Rust concepts, maybe we can just show the three most important one via a simple real-world example: the DVD seller/renter.

For example, if you buy a DVD, the DVD does not belongs anymore to the seller - it belongs to you. Otherwise, if you rent a DVD, the DVD still belongs to the company - you have borrow the DVD, and you have a limited period to watch it. This is a simple example, and maybe we can complexify the subject to include immutability, and concurrent renting for example...

What do you think about this idea?

steveklabnik commented 6 years ago

I think that an overview of borrowing and ownership would make a great presentation, and then a full one on each topic as well, for sure!

k0pernicus commented 6 years ago

Cool - I will work on it next week

k0pernicus commented 3 years ago

Hi @steveklabnik,

I was looking back to my opened issues and saw this one...

Are you still interested for a contribution in this project?

steveklabnik commented 3 years ago

Hey @k0pernicus , I should actually archive this project, as I'm not intending on working on it further. Thanks though!