The Death of D. (Was Tango vs Phobos)

Steven Schveighoffer schveiguy at yahoo.com
Fri Aug 15 13:06:38 PDT 2008


"Sean Kelly" wrote
> Steven Schveighoffer wrote:
>> This is my view (might not work, but I think it could).  For purposes of 
>> simplicity, I'll assume Walter currently develops the Phobos runtime (not 
>> that he doesn't, but I'm really not sure :).
>>
>> Maintenance of the merged runtime would become Walter's responsibility, 
>> with your help if necessary (ideas and help understanding, and 
>> enhancements if you wish).  Any changes desired for the runtime would go 
>> through Phobos (and Walter).  The Tango lib would use the now tango-fied 
>> Phobos runtime, with alias imports for existing code (e.g. 
>> tango.core.Thread would either publicly import std.thread or would 
>> privately import it, and alias the Thread class).
>
> My original goal was to have Walter maintain the DMD compiler runtime and 
> leave the rest to the appropriate parties.  Walter clearly can't maintain 
> the entire runtime because Tango includes compiler runtimes for GDC 
> (currently) and LLVMC (soon), etc.  Each of these should ideally be 
> maintained by the respective compiler author.

Again, for the purposes of simplicity, I said Walter, but I meant 'Phobos 
runtime developer'.  I don't know who that is or will be.

> One of the problems in my mind is that Phobos isn't portable, as justified 
> by the fact that GDC contains GPhobos.  It's an untenable long-term 
> solution.

Then let's make it portable :)  At least the runtime portion.

>
>> Phobos user lib code would do the same, although I'd suspect that since 
>> Walter is maintaining the runtime, he'd want to follow Phobos' package 
>> and naming conventions.  The one requirement for it is that the Phobos 
>> runtime MUST be separate from the user lib, and not depend on it.  So no 
>> calling on Andrei's fancy Phobos-only templates :)  This is similar to 
>> how I wanted Thread to use TimeSpan, but we can't because TimeSpan is 
>> part of the user lib.
>
> Yeah, I wanted to move TimeSpan into the runtime so this would be possible 
> but was out-voted.  But I think we both agree that the Tango design is 
> fairly close to ideal in that the runtime is entirely separate from the 
> user code (aside from some of the necessary exported bits).
>
>> People who have the book can still use the code and ideas presented in 
>> the book, because the imports will alias the real classes/structs from 
>> the new Phobos runtime.
>
> One concern I have about moving the runtime into Phobos is portability / 
> flexibility.  Will it be possible to use the runtime without the user code 
> as it is in Tango?

It has to be in order for both Tango and Phobos to use it.  That is a 
requirement (one which should be satisfied by copying Tango's runtime).

> Will it continue to be compiler-agnostic?

That, I can't say.  But with effort, it can be maintained that way.  Perhaps 
once the port is done, external compilers can own their respective compiler 
parts.  If they are using the new runtime, it should also be compatible with 
Tango.

My idea of the porting should involve repackaging the Tango runtime into a 
generic style (or at least one that suits whoever is maintaining it), and 
then porting both libs to use the new runtime.

The checks and balances come when releases are made that break 
compatibility, we submit bugs, the runtime gets fixed.  It works no 
different than Tango development does today, except that the runtime code 
lives in Phobos.

>> How does this sound (for both you and Walter)?
>
> When you get right down to it, I really don't want to be stuck working on 
> Tango for the rest of my life, so my feelings are mixed.  I think that D 
> accepting Tango as the official standard library and Walter et al. 
> collaborating with the Tango maintainers would be the optimal solution for 
> all concerned.

As someone who prefers Tango, D accepting Tango as the standard library 
would be fine with me.  But realistically, that ain't gonna happen :)  You 
have to respect that Phobos developers have a lot of time and effort 
invested in Phobos, and to see it just get replaced would be a huge kick in 
the ass for them.

I think the optimal solution is for both libraries to coexist, AND to be 
binary compatible.

> However, I also don't want to be placed in a position where I'm the 
> linchpin holding everything together.  My personal responsibilities have 
> grown considerably since Tango was started and that's far more time and 
> responsibility than I want, barring a considerable paycheck for doing so. 
> So in short I think it would be a bad idea but I'd probably agree to it 
> anyway because doing so is in my own best interest.

I think you might only be a linchpin until the port is done, then if you 
don't want to continue maintaining, I'm sure that void will get filled.

-Steve 





More information about the Digitalmars-d mailing list