On Thursday, 31 July 2025 at 11:29:41 UTC, IchorDev wrote:
I'd much prefer if the above code worked rather than having to
do this:
```d
static foreach(i; 0..a.tupleof.length){
pragma(msg, __traits(getAttributes, a.tupleof[i]));
//AliasSeq!(y(10))
}
```
That verbosity is unnecessary to swap to the other foreach:
`static foreach(b; a.tupleof){` prints as well
```d
import std;
@"foo" string foo;
@"bar" int bar;
void main(){
foreach(b; AliasSeq!(foo,bar)){
pragma(msg, __traits(getAttributes, b));
pragma(msg,__traits(identifier, b));
pragma(msg,b.stringof);
}
static foreach(b; AliasSeq!(foo,bar)){
pragma(msg, __traits(getAttributes, b));
pragma(msg,__traits(identifier, b));
pragma(msg,b.stringof);
}
}
```
I believe we should start calling this first one "alias foreach"