https://issues.dlang.org/show_bug.cgi?id=14758
Dmitry Olshansky <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Dmitry Olshansky <[email protected]> --- > I have modeled these statically with D's fantastic modelling features to > produce an object-oriented, easily-navigable hierarchy of the hardware memory > map (example: > https://github.com/JinShil/stm32f42_discovery_demo/blob/master/source/stm32f42/gpio.d). > It is an excellent model that generates fast code and plays very well with > tooling. The only problem is the TypeInfo bloat. I'd just go for structs + template mixins for inheritance. It's not like you do any of virtual calls/typeinfo/object factory/whatever. mixin template Register(blah...){ } struct Peripheral{ mixin Register!(x,y,z,...); mixin Register!(q,w,e,...); } Makes any sesne? --
