A Perspective on D from game industry

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 17 06:52:47 PDT 2014


On Tuesday, 17 June 2014 at 13:36:48 UTC, John Colvin wrote:
> also, foreach that works outside of function scope would be 
> awesome:
>
> mixin template A(TL ...)
> {
> 	foreach(i, T; TL)
> 	{
> 		mixin("T v" ~ i.to!string);
> 	}
> }

It is not "also", it is primary use case of static foreach


More information about the Digitalmars-d mailing list