On 7/28/14, 11:12 AM, H. S. Teoh via Digitalmars-d wrote:
On Mon, Jul 28, 2014 at 11:03:22AM -0700, Andrei Alexandrescu via Digitalmars-d 
wrote:
On 7/28/14, 4:54 AM, Daniel Murphy wrote:
"Jonathan M Davis"  wrote in message
news:lfhsrrkauworheqme...@forum.dlang.org...

I would point out that every time I've seen compiler devs discuss
using Phobos in dmd, there has been a large reluctance to do so (if
not outright a desire to avoid it entirely) in order to avoid the
circular dependencies that would ensue (Daniel Murphy in particular
really doesn't seem to like the idea).

Yes, and I'm still against it.  It's not about the circular
dependency (that already exists with druntime and is manageable) it's
that including phobos effectively massively increases the size of the
dmd codebase.  Phobos is also tied to the release cycles in a
different way than it looks like ddmd will be.  Druntime is much
smaller and much less worrying (and impossible to avoid).

There'd also be the argument that using phobos inside ddmd would make
the latter a better test for itself and phobos. -- Andrei

FWIW, I'm for dogfooding. I think using Phobos in ddmd will (indirectly)
improve the quality of Phobos.

According to Simon Peyton Jones, it has greatly worked for ghc (the reference Haskell compiler). Essentially ghc is one of the largest and most complex codebases of ghc itself. I assume they use Haskell's own standard library in the compiler.

I still have this lurking suspicion that
large swaths of Phobos have only barely been used, and therefore there
are probably many bugs, design issues, and inefficiencies that we're
unaware of. Or only unknown user code out there uses some of these
things, but we don't know about it so we're not conscious of issues that
may arise. Using Phobos in ddmd will give us very strong incentives to
polish Phobos to a far higher quality than it currently is, IMO.

Agreed. Conversely we'd be hamstringing ourselves by essentially making D a poorer choice for implementing dmd than any other languages. The standard library of a language is a good part of any language's power, and that's true especially for D; static introspection has moved a bunch of stuff usually confined to builtins into the standard library.

I'm not among the compiler development regulars but it seems to me converting to ddmd would be a mistake if we don't plan for using Phobos.


Andrei


Reply via email to