another idea for compile time functions
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Fri Feb 9 01:00:01 PST 2007
Yauheni Akhotnikau wrote:
>>> But I think it is no need to iterpret 'pure D' code at compile time.
>>> If compiler sees such mixin expression it can create temporary D
>>> program which has content of the mixin expression and then execute it
>>> in background with standard output redirection (with help of rdmd).
>>
>> I've said it before, this is useless. Metacode must have access to the
>> program's symbols.
>>
>> Andrei
>
> Can you provide some examples which show for what that is need? (May be
> I miss something but I don't see more or less realistic examples yet).
In a previous post I described the white hole and black hole classes.
Starting from an interface, build two degenerate implementations of it.
This is not possible with the naive approach of spawning execution of
separate programs.
Andrei
More information about the Digitalmars-d
mailing list