Phobos/Tango Unification Plans

Benji Smith dlanguage at benjismith.net
Mon Oct 13 08:50:55 PDT 2008


Don wrote:
> That could have some difficult aspects, but here's an uncomplicated 
> second step: The math libraries for Tango and Phobos aren't merely 
> compatible, they are THE SAME! They are a cut-and-paste of each other, 
> with a couple of trivial name changes.

I've seen this in a few other places as well.

I'm using DWin in my project, to get access to the windows registry. 
Within that library, there's a substantial copy/paste of code from the 
Tango project (core package, UserGdi, Types, etc). Or maybe Tango 
included code that was originally in DWin. I dunno the history of the 
code, but I do know that when I compile my code, I'm getting verbatim 
copies of the same stuff (except in cases where DWin has fixed a bug 
that didn't get propagated to Tango, or vice versa).

My guess is that DWin wants to stay compatible with Phobos, which is why 
it doesn't just directly depend on the Tango libs.

> The best situation I can imagine would be if Phobos started using the 
> phobos namespace for stuff which is not common with Tango, and std was 
> used for the common stuff.
> 
> My preferred option would be to remove tango.math.Math (stupid name 
> anyway), combine it with tango.math.IEEE (another doubtful name) and 
> rename it as std.math.
> The more advanced math functions would remain in Tango, since I like the 
> two-level heirachy which Tango provides. The advanced functions which 
> are currently duplicated (eg, std.math.tgamma) would be removed from 
> Phobos.

I think that's a great plan. Thanks!

--benji



More information about the Digitalmars-d mailing list