The next iteration of scope
via Digitalmars-d
digitalmars-d at puremagic.com
Thu Apr 2 04:44:14 PDT 2015
On Wednesday, 1 April 2015 at 23:03:02 UTC, bearophile wrote:
> Walter Bright:
>
>> I'm thinking of a modest step which would be a subset of your
>> proposal:
>>
>> 1. implement 'scope' and 'return' for arrays, classes, and
>> pointers
>> 2. implement inference for templates and lambdas
>> 3. enable it with the -dip25 switch
>>
>> and see how far that takes us.
>
> This is interesting. For the final D programmer what's the
> practical difference between your proposed subset compared to
> the full proposal?
The main difference is that `@safe` doesn't imply `scope`
anymore, which means a bit more typing. It also makes `static`
annotations unnecessary.
I'm fine with that, because I only suggested it to reduce the
need for explicit annotations, as Walter said that's important
for him. Of course, it would also raise the risk of breaking
existing code considerably, so that the potential benefits may
not pull their weight overall.
But I hope overloading is included under point 1. It's very
important for efficiency.
More information about the Digitalmars-d
mailing list