State of the Compiler

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 29 15:25:45 PST 2016


On Mon, 29 Feb 2016 16:57:57 +0000, Ola Fosheim Grøstad wrote:

> On Monday, 29 February 2016 at 16:22:41 UTC, Chris Wright wrote:
>> One of the important ones is: let's say DMD depended on Phobos.
>> I'm developing Phobos and DMD side by side. I need a new function for
>> DMD, and it would fit nicely in std.algorithm. So I add it to Phobos in
>> a PR, add my code to DMD the next day -- and suddenly compiling DMD is
>> a mess.
> 
> That would be the sign of a _completely_ messed up development process
> which would suggest problems way beyond using a standard library for
> writing a self-hosting compiler...

You might be complaining about a single person doing this, but it could 
be several different people instead of just one.

Continuous integration would catch this type of problem, and I think that 
would be good enough. Forbidding any dependency is the nuclear option.

> Basically all the rational arguments for not using phobos in the front
> end can be turned into arguments for not relying on phobos in any major
> project.

The first part is an argument against developing against a development 
version of phobos when people need to be able to compile with the latest 
release. I'd strongly recommend that everyone develop against released 
versions of phobos.

The second part is an argument against circular dependencies between 
projects. Phobos depends only on system libraries, libcurl, druntime, and 
dmd, and it's unlikely to add your project written in D as a new 
dependency.

I'm not sure how that translates to "never use phobos".


More information about the Digitalmars-d mailing list