Compile time filesystem access?

Peter Alexander peter.alexander.au at gmail.com
Mon Jan 30 13:20:15 PST 2012


On Monday, 30 January 2012 at 13:23:19 UTC, Manu wrote:
> Is D capable of accessing the filesystem at compile time, for 
> instance, to
> load and parse an XML DOM, or some other structural metadata, 
> which may be
> used to generate the associative struct and its members?
> I can think of many other uses for the technology too. It seems 
> extremely
> powerful, and I'm sure it's been discussed :)

As interesting as that would be, I wouldn't recommend it.

Just generate a .d file from the XML before compiling. It will be 
faster, and more flexible than trying to hit everything with the 
D hammer.


More information about the Digitalmars-d mailing list