Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
    Walter Bright via Digitalmars-d-announce 
    digitalmars-d-announce at puremagic.com
       
    Thu May 29 10:12:24 PDT 2014
    
    
  
On 5/29/2014 6:11 AM, Steven Schveighoffer wrote:
> struct X
> {
>    int a;
>    int b = void; // also initialized to 0.
> }
>
> This is because X must blit an init for a, and it would be silly to go through
> the trouble of blitting X.init to a, but not b. Especially, for instance, if you
> had an array of X (you'd have to blit every other int!)
But it would not be silly for:
   struct X {
      int a;
      int[100] b = void;
   }
to only initialize X.a. The compiler is allowed to optimize that. And, in fact, 
I wished for just this in Warp.
    
    
More information about the Digitalmars-d-announce
mailing list