Universal Function Attribute Inference

Dom DiSc dominikus at scherkl.de
Fri Apr 5 10:05:40 UTC 2024


On Wednesday, 20 March 2024 at 23:59:09 UTC, Paul Backus wrote:
> On Monday, 18 March 2024 at 10:30:28 UTC, Richard (Rikki) 
> Andrew Cattermole wrote:
>> I am assuming that you generate .di files every time and use 
>> that for importing, not the .d files.
>
> Yes, this is one possible mitigation.
>
> The main downside of this is that .di files don't include 
> function bodies, so you lose access to cross-module CTFE. 
> Although I guess we could add a compiler switch to include 
> function bodies in .di files.

I would much better like having .di files that don't contain any 
code (even not for templates) and instead store the template 
bodies in some intermediary format in another file (of course not 
an object file, as it need to be possible to create different 
instances from it, but also not source-code because it should be 
possible to deliver e.g. a library without sources).


More information about the dip.ideas mailing list