Structs are Not Plain: A call for empty struct constructors

Ola Fosheim Grøstad ola.fosheim.grostad at
Fri Oct 4 07:57:38 UTC 2019

On Monday, 23 September 2019 at 09:03:25 UTC, Olivier FAURE wrote:
> I just want to point out that this isn't an inherently 
> unsolvable problem. You can have a type system where leaving 
> your variable uninitialized is statically forbidden

The problem is containers like arrays. It is difficult to prove 
that every element has been initialized.

Btw, having everything zero-initialized by default has a 
performance advantage (you can have a background thread zero out 
the unused memory pool).

More information about the Digitalmars-d mailing list