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

Basile B. b2.temp at gmx.com
Thu Sep 9 12:48:03 UTC 2021


On Thursday, 9 September 2021 at 11:45:55 UTC, Dennis wrote:
> 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.

The answer is clear then ;)

Compilers traits dont require a DIP (IIRC) so just go on and be 
smart when answering the review comments.


More information about the Digitalmars-d mailing list