On 03/21/2012 10:37 PM, Nick Sabalausky wrote:
"F i L"<witte2...@gmail.com> wrote in message
news:sofbqiiyvragxjaxq...@forum.dlang.org...
Kapps wrote:
or even automatically creating bindings for a C header file.
I've thought about that before. It would be great to have fully automatic
linking to C libs. You could even have a cache system that stores .di
files and only regenerates them if the .h file was modified.
That hits on the one irritating limitation of CTFE: No I/O. So that cache
system would be a no-go right now.
I once cached CTFE results by wrapping some templates into another
template that would generate pragma(msg, ...) output that was then
fitered out by an external d program and written to temporary files. On
the next compilation run, the wrapper template would notice the
existence of a suitable cache file and use its contents instead of
starting the CTFE execution.