AST Macros?

Paul D. Anderson paul.d.removethis.anderson at comcast.andthis.net
Tue Jun 5 16:06:29 PDT 2012


On Tuesday, 5 June 2012 at 21:20:43 UTC, Jacob Carlborg wrote:
> On 2012-06-05 11:02, foobar wrote:
>
>> This argument was raised before. That "heap of problems" is as 
>> vague as
>> the proposed AST system(s).
>> As far as I can tell, that heap of problems is mainly about 
>> making it
>> harder to make internal breaking changes since the compiler is 
>> no longer
>> a black box.
>>
>> Now, I'd argue that having a stable API for those compiler 
>> internals in
>> needed anyway. Besides the obvious benefits of a more modular 
>> design
>> that better encapsulates the different layers of the 
>> compilation
>> process, it allows us to implement a compiler as a set of 
>> libraries
>> which benefits the tool ecosystem, IDEs, text-editors, lint 
>> tools, etc.
>> Thools which could reuse subsets of these libraries (e.g. 
>> think of
>> Clang's design and how it allowed for the vim auto-complete 
>> plugin).
>>
>> Even _without_ the AST macros I think it's a worthy goal to 
>> pursuit, AST
>> macros simply make the outcome that much sweeter.
>
> I couldn't agree more.

Can we move this to a DIP?

Paul




More information about the Digitalmars-d mailing list