With statement become like C#'s using?

Bosak bosak at gmail.com
Mon Aug 5 06:31:03 PDT 2013


On Monday, 5 August 2013 at 13:11:44 UTC, bearophile wrote:
> Michal Minich:
>
>> void foo ()
>> {
>>   scope obj = new Object;
>> } // obj will be destructed here
>
> That usage of scope has being deprecated...
>
> For Walter: I suggest dmd to give a deprecation message where 
> you use one of the many deprecated D features, like scope 
> classes, floating point comparison operators, and so on. 
> Otherwise D programmers will use those featueres in their code 
> today, and when those feature become deprecated, those people 
> will become angry because of too much code to modify/fix.
>
> Bye,
> bearophile

Interesting. I didn't knew that it is being deprecated. So my 
suggestion could actually be a good replacement of scope.?



More information about the Digitalmars-d mailing list