DIP 50 - AST macros

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Nov 12 08:54:17 PST 2013


On 11/12/13 8:47 AM, Dicebot wrote:
> On Tuesday, 12 November 2013 at 16:39:18 UTC, Andrei Alexandrescu wrote:
>> Maybe the problem needs to be reformulated for D. I think an SQL mixin
>> that either stays unchanged (for DB engines) or translates to a D
>> expression (for native D data types) would be doable, nontrivial,
>> interesting, and instantly usable for people who already know SQL
>> without any extra learning. In other words... actually better than Linq.
>
> It does not matter that much if it is macro or mixin. Key feature is AST
> reflection which allows to augment valid D code with additional
> semantics when appropriate.

I don't see how AST reflection is needed for generating correct D code 
from an SQL expression. Dmitry did exactly that with ctRegex. Please 
illuminate.

Andrei



More information about the Digitalmars-d mailing list