www.digitalmars.com         C & C++   DMDScript  

D - D compiler status

reply "Walter" <walter digitalmars.com> writes:
I suppose people might be wondering what I'm working on with the compiler at
the moment. After all, why did I waste time implementing an inline
assembler, when so much needs to be done with the core language?

The answer is the garbage collector. It is currently written in C++, and is
single threaded. It's the main barrier to getting D to support multithreaded
programming. To upgrade the garbage collector, it needs to handle
exceptions.

D has great syntax for synchronizing and handling exceptions, but those do
not fit in well with C++ exceptions. So, the garbage collector needs to be
rewritten in D. Rewriting it in D needs, well, a few lines of inline
assembler.

Now that the inline assembler is done (and I also put the instruction set
support enhancements back into the C compiler), I am working on converting
the garbage collector to D. My aim is to remove all the C and C++ code from
the runtime library, and have it fully bootstrapped into D.

Writing the garbage collector in D proves that D can write system level
code. (How many other pretender successors to C++ can you write a real gc
in? <g>)
Mar 08 2002
parent reply "J. Daniel Smith" <j_daniel_smith HoTMaiL.com> writes:
If you used the CLR from .NET you would get a garbage collector "for free".
:-)

   Dan

"Walter" <walter digitalmars.com> wrote in message
news:a6cclp$1mqi$1 digitaldaemon.com...
 I suppose people might be wondering what I'm working on with the compiler

 the moment. After all, why did I waste time implementing an inline
 assembler, when so much needs to be done with the core language?

 The answer is the garbage collector. It is currently written in C++, and

 single threaded. It's the main barrier to getting D to support

 programming. To upgrade the garbage collector, it needs to handle
 exceptions.

 D has great syntax for synchronizing and handling exceptions, but those do
 not fit in well with C++ exceptions. So, the garbage collector needs to be
 rewritten in D. Rewriting it in D needs, well, a few lines of inline
 assembler.

 Now that the inline assembler is done (and I also put the instruction set
 support enhancements back into the C compiler), I am working on converting
 the garbage collector to D. My aim is to remove all the C and C++ code

 the runtime library, and have it fully bootstrapped into D.

 Writing the garbage collector in D proves that D can write system level
 code. (How many other pretender successors to C++ can you write a real gc
 in? <g>)

Mar 11 2002
parent reply "Walter" <walter digitalmars.com> writes:
"J. Daniel Smith" <j_daniel_smith HoTMaiL.com> wrote in message
news:a6idtd$1am9$1 digitaldaemon.com...
 If you used the CLR from .NET you would get a garbage collector "for

 :-)

Can't write system code in .NET.
Mar 11 2002
parent reply "J. Daniel Smith" <j_daniel_smith HoTMaiL.com> writes:
It's your language, so you're of course free to do whatever you want with
it.

But I still contend that by focusing on the "systems" aspect, you're loosing
a lot of mindshare; I'd much rather see D as an "improved C++" (or "an
alternative to C#") rather than a wholesale flat-out replacment for C/C++.
Counting either lines-of-code or number of developers, I suspect only a very
small amount of "systems" code is written these days.  Device drivers is the
most obvious example where it is still necessary for a non-trivial number of
programmers to get down to the "bare metal"; but D has the potential to be
useful to a much larger audience than low-level bit-twidlers.

   Dan

"Walter" <walter digitalmars.com> wrote in message
news:a6j2nt$1jqe$1 digitaldaemon.com...
 "J. Daniel Smith" <j_daniel_smith HoTMaiL.com> wrote in message
 news:a6idtd$1am9$1 digitaldaemon.com...
 If you used the CLR from .NET you would get a garbage collector "for

 :-)

Can't write system code in .NET.

Mar 11 2002
next sibling parent "OddesE" <OddesE_XYZ hotmail.com> writes:
"J. Daniel Smith" <j_daniel_smith HoTMaiL.com> wrote in message
news:a6j877$1m4a$1 digitaldaemon.com...
 "Walter" <walter digitalmars.com> wrote in message
 news:a6j2nt$1jqe$1 digitaldaemon.com...
 "J. Daniel Smith" <j_daniel_smith HoTMaiL.com> wrote in message
 news:a6idtd$1am9$1 digitaldaemon.com...
 If you used the CLR from .NET you would get a garbage collector "for

 :-)

Can't write system code in .NET.

It's your language, so you're of course free to do whatever you want with it. But I still contend that by focusing on the "systems" aspect, you're

 a lot of mindshare; I'd much rather see D as an "improved C++" (or "an
 alternative to C#") rather than a wholesale flat-out replacment for C/C++.
 Counting either lines-of-code or number of developers, I suspect only a

 small amount of "systems" code is written these days.  Device drivers is

 most obvious example where it is still necessary for a non-trivial number

 programmers to get down to the "bare metal"; but D has the potential to be
 useful to a much larger audience than low-level bit-twidlers.

    Dan

I think Walter meant that D needs a system level garbage collector, not some CLR interpreted one, and that such a gc cannot be built with .NET? -- Stijn OddesE_XYZ hotmail.com http://OddesE.cjb.net __________________________________________ Remove _XYZ from my address when replying by mail
Mar 11 2002
prev sibling next sibling parent roland <nancyetroland free.fr> writes:
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

"J. Daniel Smith" a écrit :

 It's your language, so you're of course free to do whatever you want with
 it.

 But I still contend that by focusing on the "systems" aspect, you're loosing
 a lot of mindshare; I'd much rather see D as an "improved C++" (or "an
 alternative to C#") rather than a wholesale flat-out replacment for C/C++.
 Counting either lines-of-code or number of developers, I suspect only a very
 small amount of "systems" code is written these days.  Device drivers is the
 most obvious example where it is still necessary for a non-trivial number of
 programmers to get down to the "bare metal"; but D has the potential to be
 useful to a much larger audience than low-level bit-twidlers.

    Dan

 "Walter" <walter digitalmars.com> wrote in message
 news:a6j2nt$1jqe$1 digitaldaemon.com...
 "J. Daniel Smith" <j_daniel_smith HoTMaiL.com> wrote in message
 news:a6idtd$1am9$1 digitaldaemon.com...
 If you used the CLR from .NET you would get a garbage collector "for

 :-)

Can't write system code in .NET.


- If you can do system programming then that mean you are not limited by the langage itself. That mean all the possibility remains open, witch is a good thing for a new langage. Lets restric it the later possible. - system programming is often complex and difficult to debug. For that, a new tool like D is interresting. roland
Mar 11 2002
prev sibling parent "Walter" <walter digitalmars.com> writes:
D is intended as the evolutionary next step for the kinds of programs that C
and C++ targets. That is a great deal broader than what .net addresses.

From a pragmatic standpoint, D is new and has yet to prove itself. .net is
brand new and has yet to live up to any of its promises. It seems to me that
tying D to .net at this time will add unnecessary risk.

I think the bare metal bit twiddlers need a great language, too <g>.

"J. Daniel Smith" <j_daniel_smith HoTMaiL.com> wrote in message
news:a6j877$1m4a$1 digitaldaemon.com...
 It's your language, so you're of course free to do whatever you want with
 it.

 But I still contend that by focusing on the "systems" aspect, you're

 a lot of mindshare; I'd much rather see D as an "improved C++" (or "an
 alternative to C#") rather than a wholesale flat-out replacment for C/C++.
 Counting either lines-of-code or number of developers, I suspect only a

 small amount of "systems" code is written these days.  Device drivers is

 most obvious example where it is still necessary for a non-trivial number

 programmers to get down to the "bare metal"; but D has the potential to be
 useful to a much larger audience than low-level bit-twidlers.

    Dan

Mar 11 2002