Voldemort Types in D

Jonathan M Davis jmdavisProg at gmx.com
Wed May 9 13:35:00 PDT 2012


On Wednesday, May 09, 2012 22:11:20 Jacob Carlborg wrote:
> On 2012-05-09 20:54, Adam Wilson wrote:
> > Nuts. It's CTFE. Because the implementation source is being stripped
> > out, that was *THE* main request of DI files and they are pointless
> > without that.
> > 
> > Essentially DI files and CTFE are mutually exclusive.
> 
> No, it's the same issue with templates and inline. C/C++ headers have
> the same issue. If you want to have a CTFE function you need to include
> it in the DI file.

Yeah. You _can_ strip them out (except for templates), but doing so restricts 
what you can do (in this case, killing inlining and CTFE). Personally, I think 
that it makes .di files essentially useless except in specific cases where you 
can't use CTFE anyway and inlining isn't an issue (e.g. much of std.file 
wouldn't need its implementation available, but that would be fatal to a 
module like std.string).

- Jonathan M Davis


More information about the Digitalmars-d-announce mailing list