Yes. Someone that knows just a little more of rust than you do would know what the borrow checker is.
It’s the core feature of rust.
Like talking about java and not knowing what “inheritance” is.
EDIT: just so you understand how vibecoded that project is.
The dude says he vibecoded “some of it” because some rust features make it a hard language for him. The one feature he’s talking about is the borrow checker.
It’s like saying “man, sure is hot today”. Someone says “yeah, this summer sure is hot” and the dude replied “yeah, summerians lived in a hot place too”.
Very integral. When someone says they’re “struggling with Rust”, it’s thanks to the borrow checker.
Rust’s whole shtick is the way it manages memory, which is the rules enforced by the borrow checker.
Basically:
When you want to store values in variables in any programming language, the memory should be allocated when you need it and freed as soon as you don’t anymore.
Traditionally there are two ways this is done:
You manage it completely yourself, which is “unsafe” as you can forget to free memory you no longer need. This is called leaking memory. Or “reference” the location of something you freed previously, thereby attempting to read data you may not have permission to read (the OS will usually prevent that and kill the program), or reading and using a value you didn’t expect, causing undefined behavior and fun to deal with bugs.
The language, sometimes using a process which runs alongside your main program, manages memory. Which adds lots of overhead.
Rust has it’s own way of doing this: It adds some rules on how you can pass around references and ownership and these rules are affected by whether you can or can’t edit the referenced data. All just so the compiler knows the lifetime of the vars that hold that data and when it can free it (before the program is even compiled, so no overhead when the program is running). Not following the strict rules prevents your program from being compiled into an executable.
The compiler gives very helpful info, tips, and pointers™ though, Rust is also know for this.
I know nothing about rust but I assume borrow checker is some integral part of it that this guy somehow has never heard of?
Yes. Someone that knows just a little more of rust than you do would know what the borrow checker is.
It’s the core feature of rust.
Like talking about java and not knowing what “inheritance” is.
EDIT: just so you understand how vibecoded that project is.
The dude says he vibecoded “some of it” because some rust features make it a hard language for him. The one feature he’s talking about is the borrow checker.
It’s like saying “man, sure is hot today”. Someone says “yeah, this summer sure is hot” and the dude replied “yeah, summerians lived in a hot place too”.
Very integral. When someone says they’re “struggling with Rust”, it’s thanks to the borrow checker.
Rust’s whole shtick is the way it manages memory, which is the rules enforced by the borrow checker.
Basically:
When you want to store values in variables in any programming language, the memory should be allocated when you need it and freed as soon as you don’t anymore.
Traditionally there are two ways this is done:
You manage it completely yourself, which is “unsafe” as you can forget to free memory you no longer need. This is called leaking memory. Or “reference” the location of something you freed previously, thereby attempting to read data you may not have permission to read (the OS will usually prevent that and kill the program), or reading and using a value you didn’t expect, causing undefined behavior and fun to deal with bugs.
The language, sometimes using a process which runs alongside your main program, manages memory. Which adds lots of overhead.
Rust has it’s own way of doing this: It adds some rules on how you can pass around references and ownership and these rules are affected by whether you can or can’t edit the referenced data. All just so the compiler knows the lifetime of the vars that hold that data and when it can free it (before the program is even compiled, so no overhead when the program is running). Not following the strict rules prevents your program from being compiled into an executable.
The compiler gives very helpful info, tips, and pointers™ though, Rust is also know for this.
Thanks for the explanation!
Some would call it the single biggest source of gotcha moments learning the language