Structs can't be zero bytes in size?

Vladimir Panteleev vladimir at thecybershadow.net
Mon Sep 2 17:34:07 PDT 2013


On Tuesday, 3 September 2013 at 00:05:04 UTC, Walter Bright wrote:
> On 9/2/2013 4:57 PM, Dylan Knutson wrote:
>> Can someone shed some light on this?
>
> It comes from C. This was done in C so that addresses of struct 
> instances will always be unique.

Why is that important, and why does D need it?

In C, this might make some sense, however empty structs are much 
more useful in D, e.g. for metaprogramming.


More information about the Digitalmars-d mailing list