RFC: moving forward with @nogc Phobos

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 1 02:51:08 PDT 2014


On 9/30/14, 11:06 AM, Dmitry Olshansky wrote:
> 29-Sep-2014 14:49, Andrei Alexandrescu пишет:
>> auto setExtension(MemoryManagementPolicy mmp = gc, R1, R2)(R1 path, R2
>> ext)
>> if (...)
>> {
>>      static if (mmp == gc) alias S = string;
>>      else alias S = RCString;
>>      S result;
>>      ...
>>      return result;
>> }
>
> Incredible code bloat? Boilerplate in each function for the win?
> I'm at loss as to how it would make things better.

Sean's idea to make string an alias of the policy takes care of this 
concern. -- Andrei



More information about the Digitalmars-d mailing list