www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Image of objects and classes

There's something I'd like to see something added to the standard D
documentation: one or two images that show the details of how in D objects and
classes are represented in memory.
I am talking about a black&while image with boxes for the fields and arrows for
the pointers, that shows for a couple tiny programs where and how monitor,
pointer to vtables, vtables, interfaces, and and so on point to each other and
are shaped. I think a simple example and a more complex example that uses
interfaces too may be enough.
I think a person that knows such things may need only one hour to create such
image in a basic way.
Years ago I have found that such kind of images help me a lot to understand how
things actually are. In a higher level language probably you don't need to know
such details, but in a lower/system language it's sometimes useful.

Bye,
bearophile
Dec 22 2008