phobos / tango / ares
Bill Baxter
dnewsgroup at billbaxter.com
Wed Feb 7 20:36:32 PST 2007
Sean Kelly wrote:
> Bill Baxter wrote:
>> Lars Ivar Igesund wrote:
>>> Frits van Bommel wrote:
>>>
>>>> Which one to use is hard to say at this point. I've been trying out
>>>> Tango since its release and I like it but I sometimes miss some
>>>> parts of
>>>> Phobos. Whether this is because Phobos is just more familiar to me or
>>>> actually better is hard to say...
>>>
>>> Note that what you miss that you feel you have in Phobos, is very
>>> much part
>>> of the feedback we would like.
>>
>> I'm having trouble understanding first why Tango had to be made
>> mutually exclusive to Phobos (is it just changes to object.d? were
>> those really necessary?)
>
> The Tango runtime code contains quite a few differences compared to
> Phobos, but the bulk of these are hidden from the user. Some of the
> more visible differences are that Error has been dropped, Exception
> reworked, Object.toString() changed to Object.toUtf8(), and the Thread
> object has a slightly different interface. During development, both in
> Ares/Mango and now in Tango, no effort was made to either deliberately
> mimic or to differ from Phobos. Rather, a design was chosen that simply
> made the most sense. That said, a great deal of effort has been made to
> avoid changing anything that feels like a language feature, and it was
> sometimes difficult to determine where the line should be drawn. The
> Object.toString() issue sits pretty squarely on that line, and a great
> deal of discussion took place before that particular change was agreed
> upon.
>
> > and if object.d differences are the only reason, then I
>> still don't really get why most Phobos code can't still be imported as
>> is or with trivial changes. For example, phobos' std.path doesn't
>> seem to have any direct dependencies on the gc API or on a particular
>> version of object.d. What's the issue?
>
> Most Phobos code can be imported as is or with trivial changes, it's
> simply a matter of taking the time to do so. Frank actually did this a
> while back for his own use, and the project now lives on dsource as
> tango.phobos. I am sure it could do with some dedicated maintainers --
> developing one library is quite enough for me :-)
Ok. Thanks for the explanation.
There were some comments before about "porting phobos to tango" that
just made it sound like a bigger job that it apparently is in fact.
As many people have noticed, phobos doesn't really change very quickly
<g> so I suspect it wouldn't be too much work to maintain compatibility
once achieved. Patches seem like a good way to go. If you have a patch
against phobos then applying it to new versions of phobos would likely
just work, since the changes to phobos are few.
--bb
More information about the Digitalmars-d-learn
mailing list