This is probably a bad idea, but from my readings of the dmd source, I noticed some preprocessor defines that looked useful, along the lines of
#define CASES case A:case B: (etc) I'd kinda like something similar in D, but a naive attempt with mixins doesn't work, e.g. immutable string cases = "case 1: case 2:"; //my d2fu sucks .. switch(x){ mixin(cases); dosomething(); default: dosomething(); } Any ideas (not including concatenating cases with body of case)?