Adding staticIota to typetuple.d#1440
Adding staticIota to typetuple.d#1440monarchdodra wants to merge 6 commits intodlang:masterfrom monarchdodra:Iota
Conversation
std/typetuple.d
Outdated
There was a problem hiding this comment.
Why are all of these parameters aliases instead of integrals?
There was a problem hiding this comment.
To accept floats, or chars. For typed output if you want ubyte/int/ulong.
|
You do no follow name convention. The name must be lowercased. |
|
And yes, thanks. |
I'm unsure...
Thanks a lot. Very smart. I shamelessly copied most of it. BTW, mine handles |
You are confused by
Never tought about such application. ) @andralex, what about finally introduce undocumented |
|
Allright. |
|
Done. It is now called |
Also improve implementation in terms of recursion depth
|
Rebased. Any further input? |
|
Sorry for not seeing this earlier (I'm pretty much out of the loop until end of August), but I'm not sure whether it makes sense to start duplicating all kinds of functionality that already exists as (at least in principle) CTFE-able runtime function‚ just to have it yield a compile-time tuple instead of a range/array. Wouldn't it make much more sense to offer something like There might be compiler performance implications to consider, but in general I think keeping things orthogonal is the way to go. |
|
Hum... |
I got it to work. It's actually trivially easy (easier than writing static iota as a matter of fact...) Excellent idea in any case. |
First attempt for a static Iota.
http://d.puremagic.com/issues/show_bug.cgi?id=4085