Map one tuple to another Tuple of different type

Vlad Levenfeld via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 21 19:47:51 PDT 2014


On Monday, 21 July 2014 at 19:02:59 UTC, H. S. Teoh via 
Digitalmars-d-learn wrote:
> functionality is desirable. Maybe we should rouse a racket on 
> the main D
> forum to either make staticIota public, or implement static 
> foreach. ;-)

static switch would be so sick. I frequently find myself doing 
some compile-time branching with more than 2 branches or with an 
enum (like for policies/strategies/whatever). Compile-time case 
labels would clean that code up, and final switch would be a 
maintenance improvement as well.

static while sounds cool, but how would it work? (as in use case, 
not implementation). The condition would have to be immutable, 
wouldn't it?


More information about the Digitalmars-d-learn mailing list