Attribute inference for auto functions?

Jesse Phillips Jessekphillips+d at gmail.com
Tue Apr 16 19:32:07 PDT 2013


On Tuesday, 16 April 2013 at 15:22:56 UTC, Andrei Alexandrescu 
wrote:
> There's a discussion that may be of interest to the larger 
> community: 
> https://github.com/D-Programming-Language/dmd/pull/1877
>
> Andrei

I'm not convinced that specifying the exact return type is such a 
huge inconvenience to those who use separate compilation.

I don't view this as an inconsistency, but definitely a change to 
why one might choose to use auto.

I'm pretty much for this change. However, I also think it would 
be good to introduce attributes to specify a throwing function as 
it would have uses in a file headed with

     nothrow:

I'd suggest the same for pure, but 'nopure' isn't the greatest of 
names. Anyway it is the same reason we have @system, I'd just 
hope they don't get added as @throws and @nopure as that would be 
inconsistent.


More information about the Digitalmars-d mailing list