Comparing D structs

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun May 17 14:12:49 PDT 2009


On Sun, May 17, 2009 at 5:00 PM, Dan <twinbee42 at skytopia.com> wrote:
> That sounds great, and seems like yet another reason for me to switch to D (other than the removal of header files which always seemed like a kludge).
>
> Just for the record though, I think one can initialize/blank/calloc C structs too, but the problem is that some struct elements (of the same array) may have padding while others don't, or perhaps they have different size paddings.

Sure, you can calloc or memset a C struct.  I've never heard of
padding varying for different instances of the same struct type, but
who knows.  So much of C is implementation-defined..


More information about the Digitalmars-d-learn mailing list