New feature proposal: "initialization scope"

TommiT tommitissari at hotmail.com
Thu May 16 01:20:16 PDT 2013


On Thursday, 16 May 2013 at 08:01:33 UTC, deadalnix wrote:
> This is easy to work around that using a mutable data, 
> construct it and then copy it to a const one.
>
> You my argue that this is slower, and I answer you : maybe. Can 
> you show what does GDC or LDC output doing so ?

I could also argue that it's just not very elegant solution. 
You're left with this extra, useless dummy variable (the initial, 
mutable one) that you're not supposed to use.

Also, I'd like to initialize immutable variables plus there's the 
possible performance issue (don't have time to do a test now).


More information about the Digitalmars-d mailing list