New feature proposal: "initialization scope"

Timothee Cour thelastmammoth at gmail.com
Thu May 16 01:52:50 PDT 2013


what's more fundamentally missing is ability to use ref on variables. DIP39
should be able to be adapted to that case.

 void main(){
    int[1000] x1_;
    int[1000] x2_;
    // do some initialization on x1_,x2_
    const(typeof(x)) x1=x1_;  //wishful thinking
    const(typeof(x)) x2=x2_;  //ditto
    assert(&x1 is &x1_); // no copy
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130516/167f89b8/attachment-0001.html>


More information about the Digitalmars-d mailing list