Should I use Phobos or Tango?
Asked Answered
L

8

26

I've decided to learn D, and I'm wondering which standard library I should use. Should I use Phobos or Tango? What are the pros and cons of each?

Lachrymose answered 28/3, 2009 at 22:34 Comment(1)
Also, take a look here: <#289587>Krantz
S
7

Tango. It's more object-oriented where appropriate, it includes containers (like STL or Java Collections), it's got an active development team, it has more momentum (it may soon be incorporated into the official compiler), and it's got real documentation, including Learn to Tango with D.

It looks like Tango may soon be incorporated into Walter's releases.

Sam answered 28/3, 2009 at 22:51 Comment(2)
While this comment was true in 2009 when this post was written, it is no longer the case. Tango doesn't even exist for D2 and now has very little mommentum. The development of phobos has opened greatly and it is receiving a lot of love.Tombaugh
There is the TangoD2 project which brings Tango to the D2 world. It is worth taking a look, at least until Phobos gets a proper stream IO package (the stream API in Phobos is deprecated!).Tarragon
M
10

If you need to use D2 then phobos is what you should use for now but tango for D2 is in development.

tangobos allows to use tango and phobos together at the same time. In D2 both work together anyway as they both make use of the separate druntime.

Mim answered 29/3, 2009 at 1:10 Comment(0)
P
8

Tango is currently outdated. It only works with the old version of D. In my opinion, Phobos is the only way forward.

I wasn't following d when all of the split library arguments were going on, but from what I can tell, a lot of the reasons for Tango disappeared when D2 was released.

There is a small effort aimed at reviving Tango, but in my opinion having a split in the standard library only hurts D as a whole.

Also barring some major event, Phobos is virtually guaranteed to be supported on every release of D. Even if Tango gets ported to D2 successfully, it could easily be abandoned again.

Paralogism answered 23/10, 2011 at 8:31 Comment(0)
S
7

Tango. It's more object-oriented where appropriate, it includes containers (like STL or Java Collections), it's got an active development team, it has more momentum (it may soon be incorporated into the official compiler), and it's got real documentation, including Learn to Tango with D.

It looks like Tango may soon be incorporated into Walter's releases.

Sam answered 28/3, 2009 at 22:51 Comment(2)
While this comment was true in 2009 when this post was written, it is no longer the case. Tango doesn't even exist for D2 and now has very little mommentum. The development of phobos has opened greatly and it is receiving a lot of love.Tombaugh
There is the TangoD2 project which brings Tango to the D2 world. It is worth taking a look, at least until Phobos gets a proper stream IO package (the stream API in Phobos is deprecated!).Tarragon
K
7

I've had little experience with both (kinda ..)

Phobos is more flat and python-like, but quite incomplete.

Tango is more Java-like, it makes simple things complicated.

I personally prefer to go with phobos, unless you need a library that depends on Tango (such as DWT).

Karimakarin answered 28/3, 2009 at 23:10 Comment(2)
One thing I hate about Tango is that it made itself incompatible with PhobosKarimakarin
Tango was an amazing project. That critic about it being Java-like is nonsense. If anything Java influence made Tango the best designed library I have seen even today when it is not actively developed... However, Phobos was always THE standard library, and that is why I have always recommended Phobos instead of Tango...Tarragon
M
7

From Dispelling Common D Myths:

Phobos is D's standard lib, period. Tango is now an optional but Phobos-compatible third party library. That's all there is to it.

Mckenziemckeon answered 20/11, 2012 at 8:13 Comment(0)
S
5

Phobos 1* vs Tango

Spermiogenesis answered 28/3, 2009 at 22:45 Comment(1)
@FeepingCreature, might I suggest adding that document somewhere on Wiki4D, or as a page in the "D Programming Language" Google group?Frontpage
S
2

If you use D2, use Phobos

If you use D1, use Tango.

And you must learn D2, so use Phobos. Easy, not ?

Note : Phobos for D2 it's much powerfull and bigger that for D1.

Stirling answered 29/6, 2011 at 19:7 Comment(0)
S
0

In my opinion, (having never actually used Boost), Tango is more like Boost, and Phobos is more elegant. As was stated above, using Phobos is much like Python.

Scout answered 20/9, 2012 at 19:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.