Standard Library Concerns (Phobos / Tango)

Jesse Phillips jessekphillips at gmail.com
Wed Feb 6 20:10:46 PST 2008


On Thu, 07 Feb 2008 00:58:50 +0000, Moritz Warning wrote:

> On Thu, 07 Feb 2008 10:30:38 +1100, Derek Parnell wrote:
> 
>> On Wed, 06 Feb 2008 10:49:17 -0400, Tim Burrell wrote:
>> 
>>> Hey all,
>>> 
>>> It seems that even though Phobos is open source, it's difficult for
>>> people to contribute to.  Patch submissions aren't being accepted as
>>> readily as they should be, and bugs remain even months after having a
>>> fix submitted by users.
>> 
>> Yes, this has been a long standing issue with Phobos development.
>> 
>> 
> Just some thing I have missed to be mentioned in this discussion. I hope
> I can contribute some some interesting/productive perspective.
> 
> Due to Phobos simpler size:
> - it's easier to maintain and adapt
> - it's easier to start with
> - it avoids to get in the way of peoples coding philosophies - people
> want to have new features (but Phobos feature set is comparable to the
> C++ std)
> 
> Due to Tangos bigger size and range of functionally (Logging, FilePath,
> Time classes, Clustering, Http stuff..). - Tango will have many changes
> as there were already - it's hard to design smth. that satisfy most
> needs if.
>    Depending on the subject of the aim, it may be even impossible.
> - Tango doesn't offer D2.0 compatibility (despite some early attemps) -
> people want to change features, since they don't fit all their special
> needs
> 
> Phobos is also an important workground to get first hand experience for
> Walter if a new feature is usefull.
> For every new DMD 2.0 version he must also offer a standard library.
> Keeping Tango up to date with all D2.0 language experiments would at
> least slow down language development considerable.
> 
> Tangobos could be a good start point to solve the issue, but it would
> have to be a _true_ subset of Tango that doesn't depend on the higher
> level features of Tango. That issue introduces two hurdles:
> - the design of Phobos and Tango must get in some sync on that level -
> some basic Tango features that Phobos also does have are probably glued
> together with fancy stuff on class level.
> 
> But I think it can be done.
> 
> Phobos need to get some more basic OO (Object Orientated) design
> (console output, threads?) and Tango need to unglue some stuff from it's
> OO that doesn't have to be OO style.
> 
> Some first attemps have already been made. (e.g. Phobos with Tango
> Threads, Tango and Phobos changes to be more compatible)
> 
> In a nutshell, I think that Tango is not ready yet to be _the_ standard
> lib. It can't move as fast as the D2.0 language evolves.
> 
> Java has a big std library, but Sun also have manpower/money. Still, it
> takes time for them to improve the language and yet, they will continue
> to have oudated parts in theire std library on regular basis (e.g. gui
> stuff). :>
> 
> For myself, I'm a satisfied Tango user. But I try not to use all fancy
> high level features often since they sometimes don't fit my needs, code
> philosophy, intended encapsulation or behaviour.

I agree that Tango isn't able to keep up with the rapid changes in D2 or 
D3? But, in my opinion I don't think it has to in order to be called the 
standard library. D2 has not been released, it has no obligation to 
provide the same environment as D1. D2 is publicly available because 
Walter relies greatly on community input/testing. Phobos can be used as 
the testing standard library, and Tango for releases.

Sure this causes people to go out of their way to test the latest D, but 
I don't see this as a problem. Since D now has stable branches, the beta 
branch shouldn't be used for production. Don't get me wrong, Phobos 
should still be a viable option for developing in.

What I think should be done. D1 should be left alone, an option of 
downloading dmd with Phobos or Tango should be available. Starting with 
D2 Tango should take over as the standard library (no tangobos). Phobos 
should be an add-on. This can either be like Tango is now where you 
download and install it, or it can come with the compiler and have a 
compiler flag to switch them.

Currently Tango is the oddball out library, you have to go to the trouble 
to find and use it. Yet many of the projects at Dsource build on it. Many 
of the projects that were built on Phobos are going to the trouble to 
switch. The only ones that aren't looking at switching seem to be the 
dead projects. This to me is a big indicator that Tango should take the 
stand. People are going to avoid using Tango because it is not "the" 
standard library.



More information about the Digitalmars-d mailing list