Compile time filesystem access?

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Mon Jan 30 06:47:14 PST 2012


Hear hear! How I understand what you mean!
"I just wanna freakin' look at it, but build a legitimate magical
mystery toy with endless possibilities!"

On Mon, Jan 30, 2012 at 6:24 PM, Manu <turkeyman at gmail.com> wrote:
> On 30 January 2012 15:41, Manu <turkeyman at gmail.com> wrote:
>>
>> On 30 January 2012 15:30, Vladimir Panteleev <vladimir at thecybershadow.net>
>> wrote:
>>>
>>> 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 :)
>>>
>>>
>>> That's what the import("filename") expression is for:
>>> http://dlang.org/expression.html#ImportExpression
>>>
>>> You'll need to approve paths for inclusion with the -J switch.
>>
>>
>> Magic! :)
>
>
> Here's another one I'm endlessly wishing I had in C.
> I want to know if a library is present, and automatically disable non-vital
> features if it isn't.
> It shits me to tears when I can't build something because a non-vital
> dependant lib is not available for a given platform or just not wanted.



-- 
Bye,
Gor Gyolchanyan.


More information about the Digitalmars-d mailing list