Application Binary Interface's a refresher of how D works

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Jan 27 09:49:48 UTC 2026


On 27/01/2026 8:14 PM, user1234 wrote:
> On Monday, 26 January 2026 at 21:21:50 UTC, FinalEvilution wrote:
>> On Tuesday, 20 January 2026 at 12:11:30 UTC, Richard (Rikki) Andrew 
>> Cattermole wrote:
>>> The N.G. has been a bit light on posts lately, so I thought I'd write 
>>> something up that might drum up some interest.
>>>
>>> [...]
>>
>> Thanks for the write-up rikki. Always interesting to know what's going 
>> on under the hood.
>> Question for you. Why the difference between C and D struct sizeof?
> 
> every object has its own memory address.
> 
> ```d
> struct S {}
> S[2] array;
> assert(&array[0] !is &array[1]);
> ```

Yes, C structs don't do this, and it can cause problems.



More information about the Digitalmars-d mailing list