Trait or builtin that returns arguments passed to current function (if any)

Dukc ajieskola at gmail.com
Thu Sep 9 09:22:35 UTC 2021


On Wednesday, 8 September 2021 at 21:53:21 UTC, Per Nordlöw wrote:
> Adam, and like others including me, are longing for a 
> trait/builtin [1] that returns the parameters passed to the 
> function of the current scope (if any). Has such a thing been 
> proposed previously?
>
> [1] 
> http://dpldocs.info/this-week-in-d/Blog.Posted_2021_07_26.html#on-my-wish-list

Why it should be a built-in? Apart from that requirement,
`Parameters!(mixin(__FUNCTION__))` does the trick. A bit verbose 
but not much more so than the `__traits(...)` built-ins.


More information about the Digitalmars-d mailing list