On Monday, 19 July 2021 at 00:07:25 UTC, someone wrote:

Every time I use it, of course, I have to double-type the tag and the value. I wonder if there's some mechanism to just type the following:

```d
debugwriteln(lobjExchanges.count);
```

... and some way to get the identifier of what's being passed, he.

The closest you can get is to use a string mixin:

```d
enum debugWriteln(string expression) =
`writeln(q"(` ~ expression ~ `)", " = ", ` ~ expression ~ `);`;

// Usage:
mixin(debugWriteln!"lobjExchanges.count");
```

Reply via email to