http://d.puremagic.com/issues/show_bug.cgi?id=8487
--- Comment #5 from timon.g...@gmx.ch 2012-07-31 21:42:23 PDT --- (In reply to comment #3) > > Well, the performance can probably be improved, but I'd advise rewriting > > that > snippet to use CTFE instead. > > I'm trying to figure out how to do that, and I'll probably manage it, but that > means using an array instead of TypeTuple, and arrays don't have the benefit > of > forcing CTFE, making it much harder (and the need to have the literals treated > as literals at the right time and not before also complicates things). It's > quite clean with TypeTuples (aside from the fact that I'm forced to split it > across multiple type tuples so that the template instantiations don't choke at > 100, thinking that they're recursing infinitely), and I'd much prefer to use > them, but with this poor performance, it's not really reasonable. > See the attachment I created for a possible solution. > > Templates aren't meant for computation. > > I don't buy that. D's templates are specifically designed in a way to make > that > sort of thing possible, and in this particular case, using templates is > definitely easier than CTFE. I disagree. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------