chosunone@pleroma.chosunone.io
@chosunone@pleroma.chosunone.io
Posts
-
I don't drink alcohol much or often. -
I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.@ianthetechie
@fasterthanlime
It's not just that. It's a guarantee that a field can never change on a structure despite other fields being mutable even with a mutable borrow existing on the entire structure. It's also useful for providing an api with public fields that shouldn't be mutated. To do that now you have to make a public getter on a private field, and then that prevents mutable borrows of the structure. -
I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.@chebra @fasterthanlime this is actually really useful for doing things like temporary mutability, where after you are done changing something you "lock" it by redeclaring it but without the mutability modifier. -
I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.@fasterthanlime I'm not sure what the right solution is, but self references that "move" with the struct. So if you move a struct, any self references get updated. Maybe a non-trivial runtime penalty, but just make it possible. I don't like reinventing pointers for referencing items in a collection I own. -
I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.@fasterthanlime When I borrow `self` mutably, it ends up locking down the entire self from immutable borrows, but really I just want certain fields to be locked down. Some fields will never be mutably borrowed and so I should allow immutable borrows to self that only access those fields. Basically in the direction of field projection. -
I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.@fasterthanlime lots of syntax sugar for pinned things -
I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.@fasterthanlime Marking fields as mutable on a struct, immutable by default -
I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.@fasterthanlime Proper generator syntax -
would you still spend time with computers if you didn't have to?@lritter I spent time with computers when I was about 3 years old, so I think I can safely answer yes to this question.