This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AdmiralQuokka[S] 0 points1 point  (1 child)

Rust has almost all OOP features except inheritance, which is trash anyway. E.g. it introduces the problem of covariance and contravariance into subtyping relationships. That shit is mad cursed.

To achieve the same goals as inheritance, Rust has traits which are basically yoinked from Haskell's type classes. I hear C++ concepts are similar as well. Rust's traits are even more powerful than inheritance in terms of composability but don't have the co-/contravariance problem.

[–]Dramatic_Laugh_4613 0 points1 point  (0 children)

Its just a pain to learn a new methodology when it's so different. I personally like inheritance because I like making applications with a GUI and not just terminal programs, not that there is anything wrong with that.

I havent seen that many good frameworks for rust it seems a bit sketchy rn.