views:

376

answers:

4

There are two of them Phobos and Tango. As far as I know they are redundant and incompatible. Are there any plans to join them? If so, when will it happen?

+5  A: 

Looks like as of October they were moving toward compatibility, but I don't know what's happened since then...

Edit:

I also found this, which seems to indicate there are no plans to actually merge:

There will be no changes to the situation for D1. However D2, as of version 2.020, has had Phobos split into 2 libraries, druntime.lib and phobos.lib. This is to allow a common runtime to be used with both Phobos and Tango. While there is no plan to merge both libraries or even include Tango with releases of DMD, this will allow both libraries to be used at the same time without a compatibility layer.

mwigdahl
+3  A: 

Tangobos is an effort to make the two compatible.

Zifre
+3  A: 

In 2.0, Tango will be able to function as a utility library on top of a shared core. The shared core is already in place, however, the Tango project has no 2.0 support yet.

In 1.0, there will be no change. This is because the 1.0 spec is effectively frozen to allow a stable target to develop against.

FeepingCreature
+12  A: 

A common core, called druntime, has been built for D2. The low-level runtime stuff, like garbage collection and threading, was previously the barrier to Phobos and Tango interoperating in the same project. Phobos's higher level functionality depended on the Phobos runtime and likewise for Tango.

A major update to Phobos has been released (just yesterday (4/20/09) as a matter of fact). This update tries to make use of some of the new features of D2 and introduces the concept of ranges, which are like iterators but easier to work with and more powerful. D2 Phobos is very different from its underpowered D1 counterpart.

Tango is by far the better standard library for D1. A D2 port is in progress, and will likely progress much more rapidly when D2 is stable. A big question is whether the Tango devs will update it to take full advantage of the D2 features, or whether they will simply focus on making it work with D2 the same way it does with D1.

Contrasting the two libraries, Phobos tends to focus more on making simple things simple, syntactic sugar, convenience and pushing the envelope of what can be done in a standard library. It's something of a cross between STL and Python's standard library, as weird as that sounds. Tango tends to have more of a Java-like feel to it. It's more focused on breadth of features and handling unusual use cases gracefully. It stays more within the sane subset of D (not as much template metaprogramming, etc., though arguably a major feature of D is to promote template metaprogramming to sane subset status), and takes a more pragmatic approach to API design.

My own guess (speculation, but it makes a lot of sense) is that Phobos will become analogous to STL, i.e. a truly standard library of core functionality, and Tango will become a utility library, kind of like Boost, as more of its core functionality is absorbed into Phobos and/or druntime.

Finally, as others noted, D1 is supposed to be stable, so nothing is changing here.

dsimcha