questions on PhanTango 'merger' - long-term vision

Lars Ivar Igesund larsivar at igesund.net
Wed Oct 10 05:30:59 PDT 2007


Aarti_pl wrote:
 
>>> That said, I see good place for both libraries here Phobos and Tango:
>>> - Phobos should do lower level stuff. Functionalities in Phobos which
>>> belongs to second group should be dropped from it.
>>> - Tango should do higher level stuff. Functionalities in Tango which
>>> belongs to first group should be dropped from it.
>> 
>> If both Phobos and Tango is part of the standard library, it would make
>> sense to clean out duplicate functionality, but regarding what is there
>> today, I would still use the "low-level" functionality of Tango, not
>> Phobos. Biased, yes, but for a reason.
> 
> Yes, but having overlapping functionality in both library would not be
> so bad. Especially when you could "merge" both libraries and allow to
> use them together. There is clearly a need for both style libraries, as
> there were quite a few votes supporting Phobos style.

Even if Tango has a different "style" than Phobos, that has never been the
reason for Tango existing. Any such need (need for certain style) should be
pretty artificial. API style shouldn't really matter when choosing a
library until the point where it clearly is the only true difference and/or
it really inhibits the usage, whether due to being badly designed or
because it don't fit with other packages used.

> 
> And Walter is not willing to drop Phobos in favor of Tango. (Probably
> just because he is supporting Phobos like style of standard library :-D)

Afaik, style is not at all the reasoning behind any such decision, even if
Phobos' style probably is Walter's preference.

> 
>>> ---
>>>
>>> In such a scenario Tango could be also delivered packaged with compiler,
>>> but it would be not necessary to use it for writing simple applications
>>> (no code in Phobos calls Tango). When someone needs higher level
>>> functionality she can use Tango. When using Tango, probably Phobos will
>>> be necessary also (Tango libraries can call Phobos).
>>>
>>> To sum up:
>>> 1. Runtime (from Tango) - one library
>>> 2. Lower level stuff Phobos - second library
>>> 3. Higher level stuff Tango - third library
>>>
>>> Everything mentioned above packed with compiler in easily installable
>>> packages for Windows/Linux/MacOs. :-)
>> 
>> If you do a s/Phobos/Tango on your 3 points above, you have correctly
>> summarized Tango :)
>> 
> 
> :-)
> 
> Probably few modules from Tango core could find its home in Phobos. You
> wrote also about free functions in Tango - it's basically style
> characterizing Phobos, so they could be also part of Phobos.

The differences between Tango and Phobos is so much more than the style,
still that seems to be the only thing people focus on when choosing Phobos
ahead of Tango. The style reason is for some a reason to choose Tango ahead
of Phobos, but it is usually different things (like performance, stability,
support, etc). This is the reason for me not thinking that your proposed
approach above immediately is a smart move.

To clarify, the non-runtime part of Tango is likely to continue to exist
forever (the forever of software and programming languages at least),
because to me and at least a few others, there is no need for Phobos. One
needs to assume that Tango and Phobos run on a common or compatible
runtime, for the following to be true, so let's assume that;

Why would anyone use any amount of time and effort to keep Tango code in
Phobos synced with the original in Tango, when all you need to do is
download Tango in addition to Phobos? Having some modules from Tango in
Phobos, then downloading Tango (because you may also want to use some
higher level features) could then result in breakage if Tango contains
unsynced changes to the stuff in Phobos (note that this don't have to be
public API changes if there are any kind of dependencies between Tango
modules in Phobos). There are also other issues with such a setup related
to mantainance, bugfixing and support in general for the code

So in my view, any kind of merger is first (and possibly only) about runtime
compatibility. If one is to merge everything in some way, it may, for
mantainance reasons (less core functionality to mantain, but a lot of work
to do the initial wrap), make sense to build one of the API's on top of the
other. Building for instance Tango IO on top of Phobos don't make sense
though (at least to me), as it would degrade performance. Doing the
opposite, would probably create other subtle differences due to Phobos' IO
going via the C runtime.  

Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list