I dun a DIP, possibly the best DIP ever
Simen Kjærås
simen.kjaras at gmail.com
Thu Apr 23 12:43:59 UTC 2020
On Wednesday, 22 April 2020 at 12:04:30 UTC, Manu wrote:
> This DIP single-handedly fixes compile-time issues in programs
> I've written by reducing template instantiations by near-100%,
> in particular, the expensive ones; recursive instantiations,
> usually implementing some form of static map.
>
> We should have done this a long time ago.
This is beautiful and awesome (syntax and all).
I was wondering if there's any way to to do a cross product with
this, like fun(Xs, Ys)... expand to fun(Xs[0], Ys[0]), fun(Xs[0],
Ys[1]), fun(Xs[1], Ys[0]), fun(Xs[1], Ys[1]), but that might very
well be rare enough to not warrant special consideration.
The other thing that worries me a little is the difference
between Foo!(AliasSeq!(1,2))... and Foo!(Numbers)... - would
Foo!(AliasSeq!(1,2)...)... do the same as Foo!(Numbers)...?
--
Simen
More information about the Digitalmars-d
mailing list