Mixin every entity
Quirin Schroll
qs.il.paperinik at gmail.com
Wed Jul 24 11:57:35 UTC 2024
Mixins can produce types, expressions, statements, and
declarations. That is great, but it could be better.
Why not allow mixin identifiers, storage classes, attributes,
etc.?
Contrived example:
```d
struct mixin("C")
{
mixin("const"):
void f(mixin("ref") int x) mixin("@safe") { }
}
```
There’s no good reason a whole entity must be written in a string
literal with a “hole” to be filled by `format` just because its
name is generated. Interpolated strings help, but are not
fundamentally different.
More information about the dip.ideas
mailing list