new DIP38: Safe references and rvalue references without runtime checks.
Steven Schveighoffer
schveiguy at yahoo.com
Tue May 7 05:27:44 PDT 2013
On Tue, 07 May 2013 00:45:56 -0400, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> On 5/6/13 11:44 PM, Timothee Cour wrote:
>>> It requires interprocedural analysis. This is possible for the same
>>> functions (such as template functions) that can infer
>>> pure/nothrow/@safe,
>>> but it cannot be done for ordinary functions.
>>
>> Can you please provide me a simple example for which the algorithm
>> proposed in the DIP38 will fail, and that does not involve cycles (as
>> described in the DIP) ?
>
> No. That's not the problem. It may as well work.
>
> When typechecking a function, ALL you have is:
>
> 1. the body of that function
>
> 2. the signatures of all other functions. NOT adorned with extra info,
> NO bodies, NO nothing.
I think the DIP fairly clearly says that either it has the function
bodies, or the compiler-generated .di files WITH the extra info added.
-Steve
More information about the Digitalmars-d
mailing list