digitalmars.D - What about GDC and LDC after DMD becomes D?
- Shriramana Sharma via Digitalmars-d (5/5) Jul 22 2015 Once the front end of DMD becomes fully D, I read that the backend
- cym13 (11/14) Jul 22 2015 I don't see an issue there. A compiler is a program that
- Xinok (6/9) Jul 22 2015 The Rust compiler is written in Rust but uses LLVM as a backend,
- rsw0x (2/11) Jul 22 2015 Both gcc and llvm expose a C api afaik
- Daniel =?UTF-8?B?S296w6Fr?= (3/7) Jul 22 2015 They will use same dmd frontend written in D.
- Kai Nacke (24/27) Jul 22 2015 Hi Shriramana!
- rsw0x (4/7) Jul 22 2015 I have a feeling this is going to end up being an issue.
Once the front end of DMD becomes fully D, I read that the backend will also become D, but then what will happen to GDC and LDC whose backends are C++ IIUC? -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
Jul 22 2015
On Wednesday, 22 July 2015 at 11:42:24 UTC, Shriramana Sharma wrote:Once the front end of DMD becomes fully D, I read that the backend will also become D, but then what will happen to GDC and LDC whose backends are C++ IIUC?I don't see an issue there. A compiler is a program that implements a standard, as long as it generates good asm it could be written in brainfuck there would be no reason to care. A D compiler written in D is a symbol, and D was written so that D-programmers could stop writting so much C++ so the idea of a DMD written in D is appealing, but that doesn't mean that all D compilers have to be written in D. The only question is "Do they copy DMD correctly?". There is no doubt that it is doable in C++.
Jul 22 2015
On Wednesday, 22 July 2015 at 11:42:24 UTC, Shriramana Sharma wrote:Once the front end of DMD becomes fully D, I read that the backend will also become D, but then what will happen to GDC and LDC whose backends are C++ IIUC?The Rust compiler is written in Rust but uses LLVM as a backend, like LDC. I don't know the complexities of linking a D frontend with a C++ backend, but if the Rust team can do it, I'm sure that means GDC and LDC will continue to live on.
Jul 22 2015
On Wednesday, 22 July 2015 at 12:02:50 UTC, Xinok wrote:On Wednesday, 22 July 2015 at 11:42:24 UTC, Shriramana Sharma wrote:Both gcc and llvm expose a C api afaikOnce the front end of DMD becomes fully D, I read that the backend will also become D, but then what will happen to GDC and LDC whose backends are C++ IIUC?The Rust compiler is written in Rust but uses LLVM as a backend, like LDC. I don't know the complexities of linking a D frontend with a C++ backend, but if the Rust team can do it, I'm sure that means GDC and LDC will continue to live on.
Jul 22 2015
On Wed, 22 Jul 2015 17:12:14 +0530 Shriramana Sharma via Digitalmars-d <digitalmars-d puremagic.com> wrote:Once the front end of DMD becomes fully D, I read that the backend will also become D, but then what will happen to GDC and LDC whose backends are C++ IIUC?They will use same dmd frontend written in D.
Jul 22 2015
On Wednesday, 22 July 2015 at 11:42:24 UTC, Shriramana Sharma wrote:Once the front end of DMD becomes fully D, I read that the backend will also become D, but then what will happen to GDC and LDC whose backends are C++ IIUC?Hi Shriramana! My current *plan A* for LDC is: Prerequisite: Enable LLVM Cpp backend For release: Compile DDMD frontend to C++ and distribute D and C++ version of DDMD. Bootstrap process: - Create stage1 ldc compiler from C++ version of frontend. - Use stage1 ldc to compile stage2 ldc compiler from D version of frontend. - For verification it could be useful to create a stage3 ldc compiler using the stage2 compiler. Advantage is that you only need a C/C++ compiler for bootstrap. Drawback is compile time. I have not yet tested this approach. Therefore *plan B*: Use a previous version of LDC to compile the current version. This will work as long as the used language in the frontend is stable. The non-frontend parts of LDC might slowly migrate from C++ to D. The pain point here is that LDC makes use of the LLVM C++ API which is really superior to the C API. Regards, Kai
Jul 22 2015
On Wednesday, 22 July 2015 at 15:11:58 UTC, Kai Nacke wrote:Use a previous version of LDC to compile the current version. This will work as long as the used language in the frontend is stable.I have a feeling this is going to end up being an issue. Whatever D version ddmd is shipped with is going to need to be a LTS version.
Jul 22 2015