"Learn to Tango with D" - The way to go?

Jarrett Billingsley jarrett.billingsley at gmail.com
Fri Sep 19 12:42:07 PDT 2008


On Fri, Sep 19, 2008 at 10:32 AM, AEon <aeon2001 at lycos.de> wrote:
> I just now got "Learn to Tango with D" and was wondering what the thoughts
> of the more seasoned programmers are on the subject of Tango.
>
>
> As far as I could find out Tango will only run with dmd v1.030, so I would
> not actually compare, Tango and Phobos under v1.030 but:
>
>   Tango with dmd v1.030 - and - Phobos with dmd v2.014 alpha

Probably a more fair comparison than Tango vs. Phobos 1, since Phobos
1 is really, really lacking in a lot of areas.

> I'd be very much interested in comments, what things were very useful or
> elegant in everyday use.
>
>
> Is it actually possible to mix Phobos and Tango lib access? Because if Tango
> uses differently names function names, it would basically mean "rewriting"
> and Phobos centric code?

No, not really.  You can use Tangobos, but there's really no point in
mixing Phobos code with Tango code, unless you just want to be
irritating.

> I have to admit I "have mixed feelings" about Tango, because my about 5K
> lines of code used Phobos, and Phobos is the original standard lib that came
> with D. So I feel like a traitor using or thinking  about using Tango.
> Strange that Kris Bell should "turn his back on Phobos" by promoting Tango
> in a book.

If no one was ever dissatisfied with the way something was, nothing
would ever improve.  D only exists because W was dissatisfied with the
systems languages available to him at the time.  Tango exists because
a large number of people were dissatisfied with the architecture and
development model of Phobos.  Besides -- what allegiance do you have
to Phobos or to Walter?  What have they done for you that you feel you
must pay back?  Isn't better to pick and choose what you feel to be
the best than to stick with one "brand" due to loyalty?

> I am still trying to learn about the everyday use of Classes, and hope to
> learn it with D. So any library that has useful - mostly string operations,
> regular expressions (log parsing stuff) - is fine with me, since I don't
> really go for the "deep stuff", yet.

Then you might not notice too much difference between the libraries
yet.  Once you start wanting to do more complex things -- mounting
archives as virtual filesystems, adding logging capabilities, piping
process inputs/outputs, *not* allocating everything on the heap --
you'll come to appreciate Tango a bit more.


More information about the Digitalmars-d-learn mailing list