struct subtyping?

bearophile bearophileHUGS at
Sun Oct 24 15:54:15 PDT 2010


> But for any reason, this logic is not pushed to the point of providing type hierarchy by subtyping. It would have been great for me, since much of the common functionality is generic. Without a type hierarchy, I need to duplicate it on each struct type, which is _bad_ (as any programmer knows ;-).

Can you explain your use case better? I am curious. I have used a hierarchy of structs in D in a small raytracer, to encode 3D objects.


More information about the Digitalmars-d-learn mailing list