Can we just have struct inheritence already?

Vladimir Panteleev thecybershadow.lists at gmail.com
Mon Jun 10 10:49:53 UTC 2019


On Monday, 10 June 2019 at 03:08:26 UTC, Walter Bright wrote:
> On 6/9/2019 12:40 PM, Vladimir Panteleev wrote:
>> Structs are always at least 1 byte in size, even when they 
>> contain no fields. This causes unnecessary bloat for reasons 
>> that I never understood.
>
> The reason is so that each struct instance is at a unique 
> address.

What advantages does this provide? Surely it can't be more 
important than being able to place behavior/policy in structs 
with no overhead?


More information about the Digitalmars-d mailing list