The worst Phobos template (in binderoo)

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 15 06:49:46 PDT 2016


On 09/15/2016 09:27 AM, Stefan Koch wrote:
> On Thursday, 15 September 2016 at 13:20:16 UTC, Andrei Alexandrescu wrote:
>> On 09/15/2016 08:35 AM, Stefan Koch wrote:
>>> On Thursday, 15 September 2016 at 12:26:08 UTC, Andrei Alexandrescu
>>> wrote:
>>>>
>>>> Apparently we need that static foreach iteration. -- Andrei
>>>
>>> What exactly do you mean ?
>>> As long as we instanciate n templates for a member nested n levels the
>>> overhead is massive!
>>> How would static foreach help ?
>>
>> I thought staticMap is just a (simulated) loop that applies the same
>> template in sequence. -- Andrei
>
> staticMap is a recursive variadic template.

Can recursion be replaced with iteration? Assume you have static foreach 
at your disposal. -- Andrei



More information about the Digitalmars-d mailing list