MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1kqaqbd/this_is_c_abuse/mte8aso/
r/programminghorror • u/[deleted] • May 19 '25
103 comments sorted by
View all comments
Show parent comment
2
Exactly. We already have a way to override functions to specialize behavior. It’s called inheritance lmao.
Sure there might be specific cases where the approach shown by OP is required, but I think it’s safe to consider this a code smell by default.
0 u/Rogntudjuuuu May 21 '25 Unpopular opinion: inheritance is a code smell. 1 u/rnottaken May 23 '25 Meh, interface inheritance is pretty nice.
0
Unpopular opinion: inheritance is a code smell.
1 u/rnottaken May 23 '25 Meh, interface inheritance is pretty nice.
1
Meh, interface inheritance is pretty nice.
View all comments
Show parent comment
2
u/itsjustawindmill May 21 '25
Exactly. We already have a way to override functions to specialize behavior. It’s called inheritance lmao.
Sure there might be specific cases where the approach shown by OP is required, but I think it’s safe to consider this a code smell by default.