A very small update on typefunctions

Stefan Koch uplink.coder at googlemail.com
Wed Jul 29 15:30:19 UTC 2020


On Wednesday, 29 July 2020 at 08:41:01 UTC, Per Nordlöw wrote:
> On Tuesday, 28 July 2020 at 23:12:28 UTC, Stefan Koch wrote:
>> I've done some work on my typefunctions.
>
> Nice. Does the evaluation of type functions reuse CTFE or is 
> the logic completely separate?
>
It reuses CTFE.

> Has there been any community feedback on the syntax for type 
> functions?
>
You have to ask the community, so far I guess it's well received.

> Will type functions enable anything more than CTFE already does?
>
> Is there / Will you support (static) foreach over type tuples 
> to reduce recursive template instantiations in std.traits?
>
Yes, that's precisely the main thing that type functions do.

> What features are missing to fully replace existing logic in 
> std.traits with type functions? One way forward to make this 
> thing more motivating is to incrementally convert std.traits to 
> type functions and monitor the benefits in terms of compilation 
> speed and memory usage all over Phobos. Especially the overhead 
> of doing
>
>     import std;
>
> in an empty file.

Uhh I assume at first that won't be easily fixable.

It's meant for thing which are at larger scale than importing std.
I am talking about builds which take more than 10 minutes.

> Keep up your inspiring ideas and work!
>
> /Per




More information about the Digitalmars-d mailing list