Transitions to new language semantics

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Jun 11 13:36:27 UTC 2021


On Friday, 11 June 2021 at 13:10:23 UTC, zjh wrote:
> In my opinion, the `Big change` is to divide large files into 
> small files, so that the granularity of source files is smaller 
> and the dependency relationship is clearer.

There is really no need to start with a big change. The best 
approach is to:

1. First insulate independent parts. So, insulate the backend 
from the front end, by putting a layer between (most likely a 
high level IR).

2. Then move independent things like inlining out of the frontend 
and onto the middle layer.

3. Modularize.

4. Iterate between redesigning interfaces / refactoring frontend 
internals.

The frontend really only need to deal with type unification, 
templates and CRFE. Maybe I missed something, but roughly.

When you have reduced the complexity of the front end then you 
can start to modularize it. Otherwise you end up doing the job 
twice.




More information about the Digitalmars-d mailing list