Understanding Rust: Ownership, Borrowing, Lifetimes


#1

Another one explanation of these basic concepts for the beginners.
I tried to specifically pay attention to the things other blog posts on this topic, as well as The Book, tend to skip, ex. what the lifetime declaration in function signature actually means in practice.


#2

I like this post! But…

(who am I kidding by saying JavaScript is pleasurable?)

This kind of thing is gonna turn a lot of people off. Yeah, it can be fashionable to pick on JavaScript, but there are a lot of people who do JS, and we want them around. Writing is generally stronger when you don’t take potshots at other languages. Compare this to the way you talk about C in the post, for example: it’s critical, yet well-reasoned, and doesn’t come across as a cheap shot.

Anyway, other than that, this is great. Would love to see many more posts about this stuff, for sure. Each new explanation is extremely helpful.


#3

This turned me off for another reason: why not Haskell?! Haskell ∈ (high-level languages with garbage collection ∩ pleasurable languages).


#4

Wow, it was beyond my expectations to get a positive review from you, thanks a lot!
And you’re right about JS, I should have been more tolerant. It was kind of a joke - you see, I do JS too, and I find it… well, not exactly pleasurable, so… Anyway, lesson learned, thanks again.


#5

No-no, you got it completely wrong. What I am saying here is that Rust is as nice as high-level languages except JS - that means Python, Ruby, Java/C#, Haskell, etc. Haskell is included, don’t worry :wink: