enum Format

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Jan 12 07:31:49 UTC 2024


Let's try something different.

Would you like me to write a small specification for an alternative 
method for passing metadata from the call site into the body that would 
allow a string interpolation feature to not use extra templates while 
still being compile time based?

I described this to Adam Wilson yesterday:

```d
func(@metadata("hi!") 2);

void func(T)(T arg) {
	enum MetaData = __traits(getAttributes, arg);
	pragma(msg, MetaData);
}
```

This is essentially what 1036e is attempting to do, but it does it with 
extra templates.


More information about the Digitalmars-d mailing list