17

Holy Shit, Rust Is Nice!
Just Used it first time!

Comments
  • 2
    I can't wrap my head around it.
  • 0
    @olback oop is wierd, but everything else makes sence
  • 1
    I was super stoked about it until I found out it doesn’t have inheritance. I’m not a fan of boilerplate.
  • 0
    @Hubot-0x58 I‘m not 100% sure, but at any rate I found it’s a very different mindset programming in Rust compared to OOP. It’s closer to C in that you have data structures that are completely public and functions that act on those structures.

    I like the idea of traits, but I found concepts that were simple to me in OOP are much harder (or at least very unfamiliar) to wrap your head around in Rust.
  • 0
    The example I ran into was that I wanted to have an abstract class whose implementations would override a virtual function and implement different logic in each subclass but be treated as instances of the same abstract type at a higher level. I couldn’t figure out how to implement even as simple a concept as that in Rust (without yucky boilerplate) and I decided I didn’t need to deal with the added complexity of learning a whole new methodology when I have enough to solve already.

    I may explore Rust again in the future when my design is more stable and stuff actually works, because I love the guarantee of memory and thread safety and the concept of ownership, but for now the lack of OOP is just too foreign to me.
Add Comment