I need to generate something that can be used as a unique handle for a user defined type (struct or class) in the D programming language. Preferably this would be a compile time computable value. I want the handle to relate to the name of the type as well as change if the internal structure (data layout) of the type changes but remain the same for most other edits (including compiling the same type into a different app).
This is not a security thing so it doesn't need to be hard to bypass or anything
My current thought is to use a string with something like an MD5 hash of the type name and member types and names.
Any thoughts