On 07/07/12 23:20, Walter Bright wrote: > In fact, we could make it a general facility, where if D sees: > > import "filename.ext"; > > that it fork/exec's the program: > > ext_to_D filename.ext tmpfile.d > > and them imports tmpfile.d.
import extern (C) "stdio.h"; which execs dimport_C "stdio.h" which returns a filename of a D module, which is then imported. This way the importer can cache the result and doesn't need to regenerate the D module until "stdio.h" or any dependency changes. artur
