this post was submitted on 29 Nov 2023
142 points (98.6% liked)

Memes

4036 readers
52 users here now

Good memes, bad memes, unite towards a united front.

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] kredditacc@lemmygrad.ml 7 points 11 months ago (1 children)

Is this some sort of OOP joke I'm too Rust to understand?

[–] ksynwa@lemmygrad.ml 2 points 11 months ago (2 children)

I never understood the difference between class and structs. From my limited knowledge both Python classes and Rust structs can have methods and attributes.

[–] CannotSleep420@lemmygrad.ml 6 points 11 months ago

Structs are based, classes are cringe.

[–] kredditacc@lemmygrad.ml 4 points 11 months ago (1 children)

Classes have inheritance. Rust structs don't.

[–] ksynwa@lemmygrad.ml 2 points 11 months ago

Now that you mention it, I do remember learning about features of OOP in my 9th grade Java class. Inheritance was one of them. There were other terms as well that I can't recall clearly.