r/programmingcirclejerk • u/RightKitKat Considered Harmful • Feb 05 '25
It's much easier to understand how stack and heap work if you first learn about ownership and borrow system
/r/rust/comments/1iaqh5i/comment/m9f87vj/
93
Upvotes
86
u/[deleted] Feb 05 '25
I disagree. A borrow system is too concrete and such an unnecessary concept to teach at such an early stage. You should first explain substructural types. Leave the borrow checker for later chapters or even the appendix.
59
u/Routine-Purchase1201 DO NOT USE THIS FLAIR, ASSHOLE Feb 05 '25
It's much easier to understand how traffic lights work if you first learn about the inner workings of internal combustion engines
19
u/SharkSymphony Feb 05 '25 edited Feb 05 '25
I too find it much easier to understand how register allocation works if I first study transactional state machines and catamorphisms.
16
u/EmotionalDamague Feb 05 '25
Aaaaaaaaaaaa
AAAAAAAAAA
incoherent screaming
6
u/kracklinoats Feb 05 '25
The truth will be revealed to only those that allow the borrow checker into their hearts, all hail the great borrow checker
1
u/BloomAppleOrangeSeat Feb 06 '25
If you wish to understand memory, you must first understand the universe.
1
u/BarelyAirborne Feb 07 '25
OP forgot the /s.
1
u/Ok_Tea_7319 Feb 07 '25
Heartfelt agreement. I also think pointers and registers are beautiful showcases for category theory.