Permanently Deleted
void_star @ void_star @lemmy.world Posts 0Comments 24Joined 11 mo. ago
void_star @ void_star @lemmy.world
Posts
0
Comments
24
Joined
11 mo. ago
Permanently Deleted
Permanently Deleted
Permanently Deleted
Permanently Deleted
Typically this is done with CRTP which does require inheritance. But I agree, you can do some meta programming or use concepts which can enforce interfaces in a different way. But back to the original comment that interfaces via inheritance are objectively bad, I don’t think there’s any consensus that this is true. And pure virtual interfaces and CRTP are both common use cases of inheritance in modern C++ codebases and are generally considered good design patterns.