DIP 50 - AST macros
Dicebot
public at dicebot.lv
Tue Nov 12 12:25:12 PST 2013
On Tuesday, 12 November 2013 at 17:20:20 UTC, Andrei Alexandrescu
wrote:
>> Other way around. Generating arbitrary output (including but
>> not limited
>> to SQL expressions) from D code.
>
> Yah. That I agree with. That's why I said we should reformulate
> the problem that LINQ solves.
I had an impression it was exactly the context in which linq was
originally mentioned, no idea why discussion has moved from that
to expressing DSL's (which is not really a problem in D) :)
>> As I have already mentioned, it is the
>> very same thing we do now with __traits and UDA's but not
>> limited to
>> only declarations.
>
> Interesting.
Reason why I am doing this comparison is that some of the cases
why UDA's are so useful applies to AST reflection capabilities
too. Most importantly, it allows to have the code which is both
valid (and used) D code on its own and used to generate some
co-product from it in automatic mode. Similar declarative
approach has been used to huge success in vibe.d code (rest,
forms) and I see no reasons why it can't be so for imperative one.
More information about the Digitalmars-d
mailing list