new DIP38: Safe references and rvalue references without runtime checks.

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 6 12:05:46 PDT 2013


On 5/6/13 3:03 PM, Andrei Alexandrescu wrote:
> On 5/6/13 2:52 PM, Timothee Cour wrote:
>> Abstract
>>
>> In short, the compiler internally annotates ref-return functions with
>> ref(i1,...,iN) indicating that the function may return argument j
>> (j=i1...iN) by reference (possibly via field accesses), where j is
>> also a ref input argument. This list can be empty, and if the function
>> is a method or internal function, argument 0 refers to implicit 'this'
>> parameter. These annotations are used to validate/invalidate ref
>> return functions that call such a ref return function. These
>> annotations are also written in the automatically generated di
>> interface files.
>>
>> See the DIP38 for more details and examples.
>
> Knee-jerk reaction: this or any scheme based on internal (non-explicit)
> annotation for functions without that triggering inter-procedural
> analysis.

Awfully put. I meant: this or any scheme based on internal 
(non-explicit) annotation for functions cannot work without triggering 
inter-procedural analysis. (I haven't read the DIP yet.)

Andrei


More information about the Digitalmars-d mailing list