How can we make it easier to experiment with the compiler?

Walter Bright newshound2 at digitalmars.com
Mon May 24 10:21:44 UTC 2021


On 5/24/2021 2:46 AM, Iain Buclaw wrote:
> To be fair, most of this is imported because a function needs the definition of 
> one or more symbols.  This can be made better by either:
> 
> 1. Making these selective imports, or...

That doesn't really help, the dependencies are still there.

> 2. Moving type definitions of AST nodes into modules that _only_ contain 
> definitions.

It is not critical that we fix target.d. It's just that it would be better if 
its API was not AST nodes, but just values. Let the caller construct the AST 
node from the information provided.

Like what we did for the C parser. I was happy to have it not indirectly import 
everything in dmd when all it needed was a couple values.

I'm not saying any of this is easy.



More information about the Digitalmars-d mailing list