Aquivalent References as in C++?

Timon Gehr timon.gehr at gmx.ch
Tue Apr 17 11:15:47 PDT 2012


On 04/17/2012 08:10 PM, Namespace wrote:
>> > Best of all solutions would be that a
>> > special keyword, for example scope, ensure that lvalues would
>> except but
>> > _no_ null-references.
>>
>> Yes, the keyword would be a little shorter than the assert() or
>> enforce() above but D already has very many keywords. :)
>
> Yes, but scope is an unused storage keyword, isn't it?

It is used.

> So it could be an idea to avoid speed losses with the current method and
> ensure that the object is not null, if it's intentional.

Define 'ensure'.


More information about the Digitalmars-d-learn mailing list