On type functions

Panke tobias at pankrath.net
Sun May 3 11:05:13 UTC 2020


On Sunday, 3 May 2020 at 10:52:37 UTC, Stefan Koch wrote:
>
> If there are any other open questions about how this is 
> supposed to work I am happy to answer them.

I think type functions are important work.

What operations are available on types? Can I do something like 
this:

---
TStruct structFromSpec(string spec)
{
     TStruct result;
     for (field; parseFields(spec))
     {
         result.addField(field.name, field.type)?
     }
     return result;
}
---

or how is it supposed to look? I'd figure compile times will be 
improved greatly at first and suffer heavily afterwards, because 
everyone will be using this awesome feature to do even more at 
compile time.

Is there any plan to cache the results of type functions? What do 
we need to incorporate into the design to make it cacheable?


I am eager to see this in action.


More information about the Digitalmars-d mailing list