Phobos/Tango Unification Plans

John Reimer terminal.node at gmail.com
Sun Oct 12 13:13:32 PDT 2008


Hello Benji,

> I was just looking through bearophile's library (which is based on
> Phobos) and thinking about how it's too bad that I can't use it
> because my code is all based on Tango.
> 
> I know there are plans currently in the works to implement a
> compatible runtime layer, via Sean's druntime project. And it'll be a
> breath of fresh air to get rid of the basic incompatibilities in the
> two runtimes.
> 
> But if that's all that happens, it'll still leave an undesirable
> situation, since all the other userland stuff will be incompatible.
> 
> Eventually, any significantly complex project is likely to have some
> dependent libraries built on top of both Phobos and Tango. At the very
> least, string-processing routines from both libraries will get
> compiled into the final executable.
> 
> Not only will that result in duplication of functionality (and code
> bloat), but it'll also mean a bunch of bit-twiddling whenever sending
> a Tango type into a Phobos-dependent library function (and vice
> versa).
> 
> Are there any plans in the works to mitigate that problem? Like,
> perhaps, negotiating a common API so that at least the names and
> argument types are the same in both libraries?
> 
> I'm sure the two libraries will always include different subsets of
> functionality, but whenever they implement the same basic features,
> it'd be great if they used a compatible API.
> 
> --benji
> 


The first step is an incredibly important step in the right direction for 
now (the runtime); I'm excited to see this happening.  Many thanks to Sean, 
Walter, Andrei, and others for allowing this to go forward.  I'm guessing 
it might not be best to push for too much more as that solution is being 
worked out.  ;-)

Eventually, similar to other suggestions here, I was hoping that Tango could 
be viewed as a group of addon libraries (tango.net, tango.io, tango.util, 
etc), selectively available to dmd users to use at whim and easily packaged 
with the std compiler as an addon subdirectory (since the runtime is shared). 
 In many respects that is exactly the current function of the Tango user 
packages except that these are based on the Tango runtime/core.  This is 
pretty much how Tangobos gets along too.  Of course, this may involve a minimal 
amount of merging of some shared concepts in Phobos/Tango at the core level, 
like you suggest; therefore, perhaps waaay in the future, this is what will 
have to be worked out (well... that and the need for Tango to move to D 2.0 
and differences in licensing?).

But beyond that, it's not so simple as the above, I imagine, because there 
is the management, interpersonal, and community factors involved at the higher 
level that are invariably much more complicated than just merging and packaging 
of code.

Yep, probably best just to be content with the druntime for now... that's 
a big move in itself ... and a great one.  If we demand too much of these 
guys, they are gonna balk. :-D

-JJR





More information about the Digitalmars-d mailing list