Is it possible that you are in fact referring to subtyping and not inheritance of attributes and members? Subtypes are great. So are typeclasses and interfaces, of course. For your usecase, a struct ...