Thread overview | |||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 07, 2007 phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
I'm having little difficulties understanding the relationship of those 3. Are they all alternatives to each other? What I know is that phobos is the standard library that provides writeln etc, also tango seems to have IO capabilities so could one compile D programs with tango instead of phobos? When to use which of these? Henning |
February 07, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Henning Hasemann | Henning Hasemann wrote:
> I'm having little difficulties understanding the relationship of those 3.
> Are they all alternatives to each other?
>
> What I know is that phobos is the standard library that provides writeln etc,
> also tango seems to have IO capabilities so could one compile D programs
> with tango instead of phobos?
> When to use which of these?
Phobos is the "default" standard library, provided with DMD (GDC has a variation of it as well, gphobos).
Tango is a recently released library based partly on Ares and Mango with influences from some other projects, IIRC.
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...
If I switch back to Phobos I'll probably miss some parts of Tango ;).
|
February 07, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Henning Hasemann | Henning Hasemann wrote: > I'm having little difficulties understanding the relationship of those 3. > Are they all alternatives to each other? > > What I know is that phobos is the standard library that provides writeln etc, > also tango seems to have IO capabilities so could one compile D programs > with tango instead of phobos? > When to use which of these? Tango is a replacement standard library, which you would use instead of Phobos. It's a combination of ares and mango, plus some new stuff. Mango can be used together with phobos, to achieve some of the Tango functionality. If you want to be compatible with both Tango and phobos, you can use version (Tango) in your app to detect which one you're compiling with. http://dsource.org/projects/tango http://dsource.org/projects/mango http://dsource.org/projects/ares |
February 07, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frits van Bommel | 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. -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi Dancing the Tango |
February 07, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars Ivar Igesund | 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.
Well, for one thing: the text formatting routines don't seem to support binary output. At least not with "{0:b}", which seemed to me to be the most logical format string for it, since "{0:x}" formats to hexadecimal.
Phobos' writefln() does, and the first program I tried to port happened to use it...
By the way, is there some documentation for what's allowed in format strings that I missed? If so, it IMHO needs to be linked more thoroughly from the documentation for things that accept them...
|
February 08, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars Ivar Igesund | 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?) 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?
--bb
|
February 08, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | 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 :-) Sean |
February 08, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | 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
|
February 08, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote:
>
> 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.
Yup. The average DMD release recently has touched maybe 2 or 3 files in std. Not a huge effort to manage for someone with a diff tool.
Sean
|
February 08, 2007 Re: phobos / tango / ares | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frits van Bommel | Frits van Bommel 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. > > Well, for one thing: the text formatting routines don't seem to support binary output. At least not with "{0:b}", which seemed to me to be the most logical format string for it, since "{0:x}" formats to hexadecimal. Phobos' writefln() does, and the first program I tried to port happened to use it... > > By the way, is there some documentation for what's allowed in format strings that I missed? If so, it IMHO needs to be linked more thoroughly from the documentation for things that accept them... Yes, documentation is not complete on all aspects, hopefully this particular aspect will be improved by the next release. In theory though, what works in C# using .Net should either work in Tango, or be noted as having missing implementation or being a bug. Since Tango is neither .Net nor is D C#, there may very well be exceptions to this rule. -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi Dancing the Tango |
Copyright © 1999-2021 by the D Language Foundation