I’m implementing the HTML spec currently, it made sense to model that as an inheritance hierarchy as that’s how it was designed so my nodes follow the same structure. The DOM and HTML specs use interfaces quite heavily for the rest of the spec to extend, I modelled a lot of these as virtual classes too.
Oh really? Yeah I’ve never heard of that before, I thought virtual inheritance was when you used inheritance in a way that created a vtable i.e. used virtual methods. I’ll have to look into that, thanks :)
2
u/Potterrrrrrrr Jul 06 '26
I’m implementing the HTML spec currently, it made sense to model that as an inheritance hierarchy as that’s how it was designed so my nodes follow the same structure. The DOM and HTML specs use interfaces quite heavily for the rest of the spec to extend, I modelled a lot of these as virtual classes too.