On Tuesday, 9 June 2026 at 00:03:37 UTC, Richard (Rikki) Andrew Cattermole wrote:
Thank you for doing this, I'm adding it to my list of references showing why we need linker lists.

---

@Route("/path") // but actually is: @Route!myRoute("/path")
void myRoute() {

}

void main() {
    import std.stdio;
    foreach(immutable(RouteInfo)* route; routes) {
        writeln(route.path);
    }
}

Id suggest something more general, maybe enum slices are mutable compile time if they have a pragma:

```d
pragma(ctmutablity)
enum int[] foo;
unittest{
  foo.writeln;//1,2
}
unittest{
  foo~=1;
//pragma(mgs,foo.stringof);//"error compile time appended enums are unsafe to access at compile time because we hate fun"
}
unittest{
  foo~=2;
}
```

```d
pragma(ctmutablity)
void*[] foo;
pragma(ctmutablity)
void function()[] bar;
void myroute(){}
foo~=&myroute;
```
  • pathologically s... monkyyy via Digitalmars-d-learn
    • Re: patholo... H. S. Teoh via Digitalmars-d-learn
    • Re: patholo... monkyyy via Digitalmars-d-learn
      • Re: pat... monkyyy via Digitalmars-d-learn
        • Re:... monkyyy via Digitalmars-d-learn
          • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
            • ... monkyyy via Digitalmars-d-learn

Reply via email to