3
jestdotty
31d

ok I think a lot of my frustrations in rust stemmed from assuming struts are like objects and therefore can contain conceptually similar things in them that in your head would seem like the same "object", and that methods should be derived therefore and such

but in reality in rust struts are for conforming to borrowing rules and it doesn't care about your conceptual organization I guess. if you try to organize things like the structs as objects then you get borrowing issues on some occasions and then I would get stuck trying to figure out how to put a method on a struct when I need to drop borrowing to do some task and whatever

the solution is to throw out your human notions of organization

so I guess it's more bare-bones to how the machine thinks about stuff (well how the borrowing is coded in the language) and doesn't care how a human does (like notions like object orientated design)

this is odd to me in a modern language but at least I've crawled out of my brain damage with enough drug-use now that I can have such epiphanies I guess. I feel so slow. I swear this should've been massively obvious and easy to grasp in like a few days before for me. rip

instead it was 2-3 years of ~5 months of actually deep coding 😒

also I can blame people saying rust can do everything, like that you can do object orientated design in it. they're being dishonest and it's harmful to the learning process if you're acting like that 😩. stop being a cult, you'll literally be more popular

Comments
  • 0
    I'm watching Rust promotions regulary from a channel named "Let's get rusty". I'm not positive towards rust but considering learning it to find out if it's like react - smth that shouldn't be popular. The speed interests me. But I want to know what price has to be paid. While C still wins, the speed difference is very minimal and it's time to try smth new I guess. Need a use case / project. Guess the basic tutorial
  • 0
    I think the confusion comes from the value semantics vs. reference semantics.
    In Rust, everything has value semantics. To get reference semantics, you need to use references explicitly, like in C++. This is vastly different from JS where every custom data structure has reference semantics automatically (objects).
    This changes how you reason about and conceptualize data in your head and how you think about identity, equality and copying.
    It‘s a paradigm shift that you need to get used to.
  • 0
    @jestdotty why? Borrowing only applies to references, not values, doesn’t it?
  • 1
    @jestdotty yes, your rule of thumb should be: everything should be immutable. Mutable only if absolutely necessary.
  • 1
    POO suxx ass big tme. Quit objectifying everything you pervert
  • 1
    @jestdotty don't be a mutant :D goddamn muteneers.
Add Comment