www.digitalmars.com         C & C++   DMDScript  

digitalmars.dip.ideas - Missing Elements in Static Array Initializers

I've written up a formal DIP which needs discussion in this forum 
first:
https://github.com/ntrel/DIPs/blob/6678d4ef9d233dd5780b80900debdf7066165655/DIPs/1NNN-NMT.md#missing-elements-in-static-array-initializers

Initially I also included a proposal for overriding `E.init` for 
missing elements (with syntax `[elements, ... = init]`) as I saw 
Walter propose syntax for that in the September meeting write-up:
https://forum.dlang.org/post/ucuhbblifjcjkfvikbqm forum.dlang.org

However I think that part is less compelling so I've removed it 
from the DIP above. Part of the justification for it is to make 
it easier to port C code which requires zero initialization. 
However, the above DIP suggests that the compiler warns the user 
about this when `E.init` is nonzero. The user would then need to 
set the missing elements to zero at runtime.
Mar 25