872

Incase it doesn't show up:

you are viewing a single comment's thread
view the rest of the comments
[-] void_star@lemmy.world 2 points 11 months ago

I agree, my terms aren’t perfect, but as you stated there isn’t really such a thing as an interface in c++, traditionally this is achieved via an abstract base class which is what I meant by using them interchangeably.

I know there are many things you can do in c++ to enforce an interface, but tying this back to the original comment that inheritance is objectively bad, I don’t think there’s any consensus that this is true. Abstract base classes (with no data members) and CRTP are both common use cases of inheritance in modern C++ codebases and are generally considered good design patterns.

this post was submitted on 02 Sep 2024
872 points (100.0% liked)

Programmer Humor

37457 readers
12 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS