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

Dennis dkorpel at gmail.com
Thu Sep 9 11:45:55 UTC 2021


On Thursday, 9 September 2021 at 10:14:03 UTC, Basile B. wrote:
> That's a contemporary D question that often comes in 
> conversations: should "feature x" be a builtin or should 
> "feature x" be made using metaprog...
>
> Is this used often ? is the metaprog version slow ?

Add "Is the metaprog version robust?". The given example doesn't 
work with `test(T...)(T args)`, doesn't work with `scope` 
parameters, doesn't work with non-copyable `ref` parameters, etc. 
I know it's a proof of concept, but I'm not sure a seamless 
library solution is even possible with how many complexities 
there are with all kinds of variadic arguments and storage 
classes D has.


More information about the Digitalmars-d mailing list