ImportC shows the way to D3?
claptrap
clap at trap.com
Mon Jun 20 23:29:04 UTC 2022
On Monday, 20 June 2022 at 08:46:25 UTC, Ola Fosheim Grøstad
wrote:
> Compiling to the same AST does not allow you to change
> semantics without ending up with more complex compiler
> internals. So you are limited to smaller semantic adjustments
> and syntax.
>
> I've suggested somewhere else that if DMD implemented a high
> level IR between frontend and backend then you could compile D2
> and D3 to the same high level IR.
>
> But you still have to replicate templates in both your D2 and
> D3 code bases as you don't want to do D-style meta programming
> in the high level IR that sits before the backend. You also
> cannot just combine D3 with D2 templates when D2 is capable of
> introspection.
>
> If fixing bugs and completing the semantics of D2 is time
> consuming, why would you make it even more difficult to achieve
> by merging D3 into the D2 frontend? Yes, this also applies to
> "import C". It was done at the wrong time. The internals should
> have been redesigned first to handle it gracefully.
Well if that's the case an experimental branch where the
internals are redesigned, and if/when that's successful you work
on D3, but you'd keep the current vanilla D2 branch as the main
compiler until such time as the experimental/D3 one is ready for
prime time.
More information about the Digitalmars-d
mailing list