Standard Library Concerns (Phobos / Tango)

Vladimir Panteleev thecybershadow at gmail.com
Thu Feb 7 02:13:36 PST 2008


On Thu, 07 Feb 2008 07:42:42 +0200, Dan <murpsoft at hotmail.com> wrote:

> I found that mildly offensive.  I use Phobos because it's more suited to my needs [read: better for me].  

I disliked Tango in the past, but the reasons why I disliked it are now mostly gone. It used to be quite buggy (the first time I used it I got the impression that most of the code was never tested in real-life scenarios), the syntax was too verbose (this was reduced by adding shortcuts like static opCall constructors), and the necessity to use lots of import statements (for which the tango.group package was added).

> 1) I know what it does

I don't understand your point - do you mean, the quality of the documentation, or the straight-forwardness of the source code? Sure, Tango code is more organized, and you need to read more to see what something does for sure (until you understand the general structure of the library), but I don't see a striking (black vs white) difference otherwise.

> The *only* reason I'd consider switching to tango is if the compiled algorithms were *noticeably* faster, or tango offered some feature that I didn't want to spend time figuring out how to implement myself.  I learn things for the purpose of understanding how they work, but if the algorithm is more or less the same, I don't care.

It's been shown numerous times in this newsgroup that some Tango components, like IO and the garbage collector, perform significantly better than the Phobos implementations. This is quite a reason in itself unless performance is a non-issue (why are you using D and not some scripting language anyway, then? :) )

That said, for my last project I've decided to use a mixture of Tango and Tangobos. Tango is missing some Phobos features like Windows registry access and std.dateparse (which allows heuristic parsing of an undefined date format), as well as some minor design flaws (using the Tango library, it's impossible to enumerate all incl. hidden files in a folder). Doing some things in Tango is still not a pretty as with Phobos, for example enumeration of files in a directory. I would have probably successfully completed that project using Phobos alone, if it wasn't for that DDBI has practically dropped Phobos support.

-- 
Best regards,
 Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list