ImportC shows the way to D3?

IGotD- nise at nise.com
Mon Jun 20 08:26:35 UTC 2022


On Monday, 20 June 2022 at 08:05:38 UTC, claptrap wrote:
> So if D can "import" C code then could the same mechanism be 
> used to move to D3? Have the compiler compile D2 and D3 code to 
> the same AST?
>
> Disclaimer : I dont know exactly how ImportC works but it 
> sounds like it compiles C code into the same AST that D code 
> uses. Then its all compiled the same.
>
> yeah I know D3... but it could be a way to introduce breaking 
> changes without too much pain?
>
> Surely i cant be the only person who's thought of this?

I think you come with a good suggestion and we need D3 as a more 
disruptive platform in order move the language forward. What you 
suggest is similar to C++ with version switches (ex. -std=c++20).

I suggest an alternative approach than with the DIPs we have 
today. With D3 we have a lower threshold what we can add. 
Depending on how successful a new feature is, the feature can be 
considered to be migrated to D2 so we can have a "migration DIP".

Right now the project is stale which is understandable as D2 
should be somewhat stable. We need D3.


More information about the Digitalmars-d mailing list