So what does (inout int = 0) do?

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 15 11:51:35 PDT 2016


On Friday, 15 April 2016 at 12:54:11 UTC, ixid wrote:
> On Friday, 15 April 2016 at 03:10:12 UTC, Andrei Alexandrescu 
> wrote:
>> We want Phobos to be beautiful, a prime example of good D 
>> code. Admittedly, it also needs to be very general and 
>> efficient, which sometimes gets in the way. But we cannot 
>> afford an accumulation of mad tricks to obscure the large 
>> design.
>>
>>
>> Andrei
>
> Why didn't we go with all functions being able to infer const, 
> pure etc rather than just templates?

The problem is essentially untractable when there are loops in 
the call graph.

That being said, it would make sense to do it for auto functions.



More information about the Digitalmars-d mailing list