D vs Rust

Marc Schütz via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 1 06:43:39 PST 2016


On Monday, 1 February 2016 at 07:13:32 UTC, xenon325 wrote:
> On Sunday, 31 January 2016 at 16:18:21 UTC, bearophile wrote:
>> And currently it's dead-easy to write unsafe code even in 
>> @safe D functions:
>>
>> int[] foo() pure @safe {
>>     int[2] a = [10, 20];
>>     auto b = a[];
>>     return b;
>> }
>> void main() {}
>
> Doesn't http://wiki.dlang.org/DIP25 fix this ?

No, it only works for `ref`.


More information about the Digitalmars-d mailing list