top | item 36460077

(no title)

wrapperup | 2 years ago

Yes. It's increasingly common in big C++ code bases (Unreal for example) to prefer interfaces, templates and composition over inheritance, though it's mostly found in newer code. Unreal is still fairly OOP since it is decades old.

Of course, there is some object-orientedness to it, the author even calls part of his new code "objects". I guess some people would call that OOP, but it's certainly not traditional OOP.

Rust does a really nice job of making that the first obvious thing to reach for (simple structs, traits and generics), and making the slower stuff like dyn traits (v-table indirection) more annoying and less desired. Reducing indirection and abstractions makes it easier to reason about code.

discuss

order

No comments yet.