TypeFunction example: ImplictConvTargets

Stefan Koch uplink.coder at googlemail.com
Wed Oct 7 00:28:45 UTC 2020


On Wednesday, 7 October 2020 at 00:18:10 UTC, Ola Fosheim Grøstad 
wrote:
> On Wednesday, 7 October 2020 at 00:11:48 UTC, Stefan Koch wrote:
>> If you know a way to do that cleanly, that does not involve a 
>> redesign of the compiler,
>> I am very interested to hear about it.
>> As things stand type functions are what I can get away with, 
>> and still be reasonably confident I won't violate language 
>> invariants.
>> Also their syntax blends in fairly nicely with the rest of D.
>
> Allright, if the syntax is such that it can be made more 
> general later then all is good.
>
> (Ive only modified the dmd lexer/parser, so I don't know where 
> the limitations are bqeyond ast level...)

With more general you mean, not just apply to types but to 
anything?

Yes that can happen. Adam actually wants this functionality as 
well.
Tbh. the syntax is currently blocking me here.
What name do I give to the (pseudo) TOP type?
that can hold anything a variadic template parameter can hold?


More information about the Digitalmars-d mailing list