▲ 893 ▼ The C++ learning process (aussie.zone) submitted 2 years ago by unionagainstdhmo@aussie.zone to c/programmerhumor@lemmy.ml 126 comments fedilink hide all child comments Incase it doesn't show up:
[+] ugo@feddit.it 4 points 2 years ago (2 children) [deleted] permalink fedilink source parent hideshow 2 child comments replies: [–] void_star@lemmy.world 2 points 2 years ago (1 child) 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. permalink fedilink source parent hideshow 1 child comment replies: [+] ugo@feddit.it 3 points 2 years ago [deleted] permalink fedilink source parent
[–] void_star@lemmy.world 2 points 2 years ago (1 child) 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. permalink fedilink source parent hideshow 1 child comment replies: [+] ugo@feddit.it 3 points 2 years ago [deleted] permalink fedilink source parent