Originally posted by jacob
View Post
Announcement
Collapse
No announcement yet.
The Latest Progress On Rust For The Linux Kernel
Collapse
X
-
- Likes 1
-
Originally posted by cl333r View Post
Desired behavior for me, maybe not for you: removing items from a vector looping from end to start, removal decided based upon certain item criteria.
Comment
-
Originally posted by mdedetrich View Post
Want to bet how many pages it will take for him/her to realize that enforcing borrow semantics via an option standard library runtime mechanism is not the same thing as the borrow checker?
- Likes 1
Comment
-
Originally posted by oleid View PostYet another analogy:
you like surfing on the roof of cars, but you never had an accident, yet Rust would treat you like a looser because Rust's train of thought goes like this: Roof surfing is really dangerous, you could fall down and cause accidents, therefore you have to be treated like a noob, just in case, for security purposes, which in Rust's case means - crashing the app. And all I'm saying is that in like 99+% of the time people surfing on cars don't cause accidents, they're normal people and shouldn't be jailed "for security reasons, just in case".
- Likes 1
Comment
-
Originally posted by cl333r View Post
Desired behavior for me, maybe not for you: removing items from a vector looping from end to start, removal decided based upon certain item criteria.
- Likes 1
Comment
-
Originally posted by cl333r View Post
The borrow checker is a concept whose job is to enforce the borrowing rules, which can be checked at compile or runtime. Period.
Never ever has Rust's lexicon (or the community in general) has called RefCell part of the borrow checker. The term borrow checker in fact comes from linguo that you can find in the Rust compiler source (since it is a compile time check).
You are confusing (and probably deliberately muddling) borrow semantics with borrow checker, they are not the same thing. Borrow semantics can be done at runtime or compile time, the borrow checker is a specific compiler type-checking phase done at compile time.Last edited by mdedetrich; 12 September 2021, 06:03 PM.
- Likes 3
Comment
-
Originally posted by IndioNuvemChuva View Post
You... Do realize the performance of editing a vector in place actually scales horribly with the number of items, right? Like, much, much worse than just pre-allocating and copying the items you want over to another vector; doing which also has the added bonus of not needing aliasing. :^)
Comment
-
Originally posted by cl333r View PostYou didn't understand: one single function calls borrow_mut() onto the same instance of a RefCell object, let's call this function SuckMuhBalls(), but different callers into SuckMuhBalls() might call SuckMuhBalls() while said RefCell object is already borrowed or not, depending on this SuckMuhBalls() might succeed or crash the app. Hence the problem: how do you know all possible runtime function call paths into SuckMuhBalls() to make sure it never crashes the app?
- Likes 3
Comment
Comment