Thread overview | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 08, 2013 Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Now that D 2.0 is fairly stable, are there any plans of writing the official DMD compiler with the D 2.0 language vs the present language of C++? DMD 2.0 would have to be feature frozen and then DMD 3.0 could be written with the previous DMD 2.0 compiler. What are your thoughts? |
January 08, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tim Krimm | On 01/08/2013 10:48 AM, Tim Krimm wrote: > > Now that D 2.0 is fairly stable, are there any plans of writing the > official DMD compiler with the D 2.0 language vs the present language of > C++? > > DMD 2.0 would have to be feature frozen and then DMD 3.0 could be > written with the previous DMD 2.0 compiler. > > What are your thoughts? There is Denis Koroskin's ddmd: http://forum.dlang.org/thread/i4obl3$kgk$1@digitalmars.com?page=1 If this page is up to date, ddmd is currently at dmd 2.040's level: http://www.dsource.org/projects/ddmd Ali |
January 08, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli Attachments:
| On Tue, Jan 8, 2013 at 8:18 PM, Ali Çehreli <acehreli@yahoo.com> wrote: > On 01/08/2013 10:48 AM, Tim Krimm wrote: > >> >> Now that D 2.0 is fairly stable, are there any plans of writing the official DMD compiler with the D 2.0 language vs the present language of C++? >> >> DMD 2.0 would have to be feature frozen and then DMD 3.0 could be written with the previous DMD 2.0 compiler. >> >> What are your thoughts? >> > > There is Denis Koroskin's ddmd: > > http://forum.dlang.org/thread/**i4obl3$kgk$1@digitalmars.com?**page=1<http://forum.dlang.org/thread/i4obl3$kgk$1@digitalmars.com?page=1> > > If this page is up to date, ddmd is currently at dmd 2.040's level: > > http://www.dsource.org/**projects/ddmd<http://www.dsource.org/projects/ddmd> > > Ali > Isn't SDC also in D? (Bernard Helyer and friends) https://github.com/bhelyer/SDC Also, Timon Gehr spoke of his own front-end (assumed to be in D) in the past, but did not provide any link to it. But, to answer the OP question: no, there are no plan to switch to D for the reference compiler in the near future, as far as I can tell. |
January 08, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tim Krimm | On Tue, Jan 08, 2013 at 07:48:58PM +0100, Tim Krimm wrote: > > Now that D 2.0 is fairly stable, are there any plans of writing the official DMD compiler with the D 2.0 language vs the present language of C++? > > DMD 2.0 would have to be feature frozen and then DMD 3.0 could be written with the previous DMD 2.0 compiler. > > What are your thoughts? Philosophically, I like this idea. D should eat its own dogfood to prove its own worth. :) However, having the D compiler itself written in D, means we will have trouble bootstrapping it on new platforms. The advantage of having a C++ implementation is that C/C++ compilers are almost the first thing that gets implemented on a new platform, so you can almost always count on their existence. So you can just compile DMD and away you go. We *could* write a cross-compiler, of course, but it still requires that you first target the D compiler (written in D) to the new platform, and then cross-compile itself to that platform. Whereas with DMD, you just use the target platform's C++ compiler and you're up and running. T -- What's a "hot crossed bun"? An angry rabbit. |
January 09, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Tuesday, 8 January 2013 at 21:57:17 UTC, H. S. Teoh wrote:
> On Tue, Jan 08, 2013 at 07:48:58PM +0100, Tim Krimm wrote:
>>
>> Now that D 2.0 is fairly stable, are there any plans of writing the
>> official DMD compiler with the D 2.0 language vs the present
>> language of C++?
>>
>> DMD 2.0 would have to be feature frozen and then DMD 3.0 could be
>> written with the previous DMD 2.0 compiler.
>>
>> What are your thoughts?
>
> Philosophically, I like this idea. D should eat its own dogfood to prove
> its own worth. :)
>
> However, having the D compiler itself written in D, means we will have
> trouble bootstrapping it on new platforms. The advantage of having a C++
> implementation is that C/C++ compilers are almost the first thing that
> gets implemented on a new platform, so you can almost always count on
> their existence. So you can just compile DMD and away you go.
>
> We *could* write a cross-compiler, of course, but it still requires that
> you first target the D compiler (written in D) to the new platform, and
> then cross-compile itself to that platform. Whereas with DMD, you just
> use the target platform's C++ compiler and you're up and running.
>
>
> T
I think the OP implied that we could build DMD2 from its C++ source on any platform and then DMD3 from its D source with DMD2.
|
January 09, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Tuesday, 8 January 2013 at 21:57:17 UTC, H. S. Teoh wrote:
> We *could* write a cross-compiler, of course, but it still requires that
> you first target the D compiler (written in D) to the new platform, and
> then cross-compile itself to that platform. Whereas with DMD, you just
> use the target platform's C++ compiler and you're up and running.
…except that you can't actually use that compiler for anything, because – wait for it – it still needs to be retargeted for the new platform. What kind of new system are you thinking of for which the first use case would be compiling x86 executables?
David
|
January 09, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Wed, Jan 09, 2013 at 01:33:35AM +0100, David Nadlinger wrote: > On Tuesday, 8 January 2013 at 21:57:17 UTC, H. S. Teoh wrote: > >We *could* write a cross-compiler, of course, but it still requires that you first target the D compiler (written in D) to the new platform, and then cross-compile itself to that platform. Whereas with DMD, you just use the target platform's C++ compiler and you're up and running. > > …except that you can't actually use that compiler for anything, because – wait for it – it still needs to be retargeted for the new platform. What kind of new system are you thinking of for which the first use case would be compiling x86 executables? [...] Heh, you're right. I appear to be having a streak of making a fool of myself today. T -- Today's society is one of specialization: as you grow, you learn more and more about less and less. Eventually, you know everything about nothing. |
January 09, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On 01/08/2013 06:38 PM, H. S. Teoh wrote:
> On Wed, Jan 09, 2013 at 01:33:35AM +0100, David Nadlinger wrote:
>> On Tuesday, 8 January 2013 at 21:57:17 UTC, H. S. Teoh wrote:
>>> We *could* write a cross-compiler, of course, but it still requires
>>> that you first target the D compiler (written in D) to the new
>>> platform, and then cross-compile itself to that platform. Whereas
>>> with DMD, you just use the target platform's C++ compiler and you're
>>> up and running.
>>
>> …except that you can't actually use that compiler for anything,
>> because – wait for it – it still needs to be retargeted for the new
>> platform. What kind of new system are you thinking of for which the
>> first use case would be compiling x86 executables?
> [...]
>
> Heh, you're right. I appear to be having a streak of making a fool of
> myself today.
>
>
> T
>
I'm embarrassed to admit that I didn't understand the problem until I read your response...
I love the idea of a D compiler in D.
Walter might have issues with working on any other compiler backend other than digitalmars, wasn't that what was determined by previous threads?
|
January 09, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Philippe Sigaud | On 01/08/2013 01:06 PM, Philippe Sigaud wrote: > On Tue, Jan 8, 2013 at 8:18 PM, Ali Çehreli<acehreli@yahoo.com> wrote: >> There is Denis Koroskin's ddmd: >> http://www.dsource.org/**projects/ddmd<http://www.dsource.org/projects/ddmd> > Isn't SDC also in D? (Bernard Helyer and friends) > https://github.com/bhelyer/SDC And Aziz Köksal's dil: https://github.com/azizk/dil Ali |
January 09, 2013 Re: Official DMD compiler written in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Tuesday, 8 January 2013 at 21:57:17 UTC, H. S. Teoh wrote:
> Philosophically, I like this idea. D should eat its own dogfood
+11111!1!!1eleven1!!!!1!
|
Copyright © 1999-2021 by the D Language Foundation