is there a way to get the identifier (call it name) of what is being passed to a function ?
SealabJaster
sealabjaster at gmail.com
Mon Jul 19 03:51:02 UTC 2021
On Monday, 19 July 2021 at 01:56:21 UTC, someone wrote:
> ...
Prepare yourself, as you may become a metaprogramming junkie in
the near future.
Throw in `static if`[0] `static foreach`[1] `string mixin()`[2]
`CTFE`[3] and make some crazy, random, arcane mess of fun
spaghetti.
I've wrote two blogs about metaprogramming in D so far, to give
you a bit of inspiration >:3 :
1. Writing text templates with embedded D code that is compiled
at compile-time[4]
2. Writing a basic JSON serialiser[5]
[0] https://dlang.org/spec/version.html#staticif
[1] https://dlang.org/spec/version.html#staticforeach
[2] https://dlang.org/articles/mixin.html
[3]
https://tour.dlang.org/tour/en/gems/compile-time-function-evaluation-ctfe
[4] https://bradley.chatha.dev/dlang-compile-time-text-templates
[5]
https://bradley.chatha.dev/BlogPost/JsonSerialiser/0-serialise-basic-d-types-dlang-tutorial-metaprogramming
More information about the Digitalmars-d-learn
mailing list