Re:Inheritance versus Composition
by aurelwu on Thursday May 09, 2019 @09:54AM
(#19868291)
automatic code generation would be a way to do it without inheritance and not manually needing to implemenet all 20+ methods.
[ Parent
| on HN ]
Code generation tends to result in bloated binaries and excessive runtime memory consumption (unless your compiler is especially clever about optimizing out the redundancies).
Yes, but you still need to create a code generator first. If your language of choice allows to do it nicely.
Re:Inheritance versus Composition
by marcosdumay on Thursday May 09, 2019 @01:05PM
(#19870026)
Automatic code generation is an incredibly effective problem factory.