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?
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.
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.
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.
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).
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.
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.
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.
© 2022 - 2024 — McMap. All rights reserved.