Is it possible to use templates to implement something like the `@show` macro from the Julia programming langauge in D?

monkyyy crazymonkyyy at gmail.com
Sun Sep 8 23:01:22 UTC 2024


On Sunday, 8 September 2024 at 22:01:10 UTC, WraithGlade wrote:
> I want to just be able to write this:
>
> ```
> show!(1 + 2)
> ```

```d
void show(string s)(){
   auto res=mixin(s);
   writeln(s,"==",res);
}

show!"1+2";
```



More information about the Digitalmars-d-learn mailing list