Is it correct to say that D reference types (classes, dynamic arrays, etc.) are always allocated on the heap; whereas D value types (structs, static arrays, etc.) are always allocated on the stack? Or is this a gross oversimplification?

Because can't structures contain classes and classes contain structures? If so, how should one thinks about these hybrid types? Does the outermost type take precedent over what ever it contains?

Can't resist this. Maybe I should just create a play code, but could a Structure contain a class that contained a structure that contained a class that... Not sure why one would ever need to, so just a theoretical question.

thanks.



Reply via email to