Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Tango

Moderators: larsivi kris

Posted: 02/19/07 03:18:33

Hello,

I am very interested in learning D, although I have a few questions / concerns. I am familiar with C++ and Java, and recently wanted to pick programming back up as a hobby after a long hiatus. At first I seriously considered Python, but then came across D and it seems like a great option.

Is Tango the future of D, or should I stick with Phobos? Will Tango become the official standard library of D, or will Phobos still have a place? Since I am starting out in D I want to focus my efforts on the best long term solution...

Any suggestions / comments?

Thanks, Mason

Author Message

Posted: 02/19/07 22:19:58

D is an excellent language to learn, especially if you've had experience with C++ and Java. It's like a breath of fresh air compared to those langauges, really. So I think you will not regret your decision if you start learning and using it.

Now for the tough part. I'll try to explain the current situation as best I can.

Tango, I admit, has thrown a bit of monkey wrench into the whole thing. It's really the best option, in my view, because it has a dedicated team of highly-responsive individuals developing it, verses one person for Phobos (Walter). Tango is full of life and represents a strong commitment to the future of D and to actually making D commercially applicable (Phobos always tended to feel like a test pad for DMD development, not a commercial grade library). Furthermore, Tango supports multiple platforms (Mac OSX, linux, win32, and others to come) and both compilers (dmd and gdc).

Technically, phobos is cross-platform too in the form of gdc's libgphobos.a, but Tango has the advantage of being designed and developed independent of the compiler writers, thus reflecting the philosophy that compiler writers do best at compiler-writing and library writers do best at library-writing. We believe that this doesn't just make sense in that respect, but also that it represents an appropriate division of labour and expertise. For example, for the longest time, there were complaints because Walter had difficulty managing and reviewing all the bug fixes that needed to go into Phobos. The Tango Team felt that Walter should never have felt such a burden given the availabilty of skilled library developers.

Now, while Tango has the support and blessing of Walter, nonetheless, he has never been clear about how far his acceptance of Tango goes. I'll be frank in saying that there has never been any indication from him that Tango is ever going to be the standard library for D, ie take Phobos place. So far, it appears he has no intention of adopting it as such as evidenced by his silence on the issue and his continued additions to Phobos with each new DMD release. Almost every release he makes forces Tango to support certain core additions (as he adds them to Phobos and Tango must duplicate) that are required as part of the language runtime. This is an unfortunate reality, but the Tango Team can do nothing to change that fact even though it means a certain amount of confusion for those that use D or are starting to learn D.

The acceptance issue was a forseen problem long before Tango was released to the public; but rather than trouble themselves over it, the Tango Team decided to act on the issues at hand rather than quibble over what was lacking in Phobos (there was never the slightest possibility of taking over development of Phobos). The issue will have to sort itself out in the end. Tango developers are action-oriented people: they don't like talking about what should be done or whining about what hasn't yet been done; they just do it. I've been repeatedly impressed with this character trait as I've delt with some of the other members here ( maybe, I will someday learn from them and adopt more of that trait, myself :) ).

In conclusion, you will see that many D projects are just in the process of supporting Tango, even though it is still concsidered a beta version; a few have already moved over to it or support both Phobos and Tango with version statements. Others have decided to stick to Phobos for various reasons, even though Tango provides a much richer and comprehensive API.

Beyond the richer API, the major difference seen by most new users is that Tango is more object oriented in it's design than Phobos (Phobos is more free function style like original C, except for a few objects and it's use of exceptions/errors).

If you are coming from Java background, then the OO feel of Tango will likely set you quite at ease; the difference is that D is so much more expressive than Java that it doesn't feel nearly as verbose. On the other hand, some programmers like the simple quick-and-dirty, flat-namespace, free-function style of Phobos because it tends to make it easier to build quick tools and apps (or so the argument goes; not everyone agrees that this is true). But the Tango philosophy is that good design for the long term is really, really important and that it's not worth it to sacrifice library design quality and extensability to go that root. This admittedly can make the learning curve for certain aspects of Tango steeper. But to augment that, Tango tries to do three things:

-- provide comprehensive and well-written documentation (manual and api-reference) for the whole of the library

-- provide examples and tutorials to help ease the learning curve.

-- provide simpler interfaces for certain elements wherever possible, thus making much of the orignal arguments for free-function style moot.

Together, these very well may make Tango even easier to use than Phobos.

We hope Tango gains more acceptance from the D community, and even more, attracts new developers to the D language. We don't know how, when, or even if, Tango will ever become the standard library for D; but we really hope it becomes a standard, to some extent, for the majority of D developers. Whether it does or not is no matter, however: we're committed to making it the best it can be and to supporting it and improving it indefinitely.

Add to this, there are yet more exciting possibilities on the horizen, mainly blooming from the momentum of Tango itself: developers here are looking at what can be done to make something similar to ruby on rails using D and Tango as the base. There are many other things being discussed (and even designed and implemented) that make Tango's future exciting.

Please feel free to ask any questions you want here. Oh, and by the way, welcome to D. :)

Posted: 02/20/07 15:07:28

JJR wrote:

D is an excellent language to learn, especially if you've had experience with C++ and Java. It's like a breath of fresh air compared to those langauges, really. So I think you will not regret your decision if you start learning and using it.

Thank you for taking the time to give such a detailed explanation and introduction. So far I have been very impressed with the community support. I look forward to learning and employing D in my programming projects...

That being said, I have to admit that the Phobos/Tango issue is a little daunting. Not all of the D projects support it yet, and people may not like having to make their software support two different libraries. In any language, I think it's important to maintain consistency, i.e. a standard library. From your explanation I get the impression that Tango is superior to Phobos. I hope that the entire D community eventually supports it!

Posted: 02/20/07 18:42:07

zzzzrrr wrote:

Thank you for taking the time to give such a detailed explanation and introduction. So far I have been very impressed with the community support. I look forward to learning and employing D in my programming projects...

That being said, I have to admit that the Phobos/Tango issue is a little daunting. Not all of the D projects support it yet, and people may not like having to make their software support two different libraries. In any language, I think it's important to maintain consistency, i.e. a standard library. From your explanation I get the impression that Tango is superior to Phobos. I hope that the entire D community eventually supports it!

I hear you. It's kind of disturbing for the community to have to deal with two libraries :P. Feel free to voice your opinion about this matter on the D newsgroup to help probe the issue. However, just be aware that Walter, so far, has remained silent on any such topics when they've come up in the newsgroup.

Perhaps he's just waiting to see where Tango goes and how well it is received. It wouldn't be prudent for him to adopt something that had very little impact on the D language. So I can see value in careful hesitation at this point. Tango is still formally beta, afterall.

Eventually, though, it would be great if we could somehow cooperate with him on the matter.