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

Tangobos

Tangobos (a.k.a. Phobos for Tango) is the strangely-named port of the Phobos standard library to the Tango runtime. The number of changes to Phobos required to make this work is actually quite minimal. When you use Tangobos, you are, for all intents and purposes, using the original Phobos. The changes are mostly in the lowest levels of the API, in code which users seldom touch.

In an effort to make life easier for developers, you can now download versions of Tango that include Tangobos directly from the main Tango download page. This makes it simple start using Tango without having to give up Phobos.

Usage

Nothing special is required. If you have installed the Tango version that includes Tangobos, you can just build your D programs as you normally would using both tango.* modules and std.* modules.

FAQ

  • Is Tangobos a translation layer? Does Tangobos emulate Phobos by trying to map the Phobos API onto equivalent Tango APIs? A: No. Tangobos is a port. It is as "native" and "direct" running on top of Tango as it was running on top of its original runtime layer. Some calls that directly reference low level functionality like the GC have had to be replaced with Tango equivalents, but at that level the API differences between Tango and Phobos are small.
  • How does Tangobos fit into the Tango picture? A: Tangobos is bundled with the Tango downloads to simplify compatibility problems with Phobos. Tangobos is a discrete and distinct project on dsource, and support is provided directly via that project rather than via the Tango team.
  • Do I have to give up Phobos eventually? A: No. Tangobos works fine. So there's no reason you should have to stop using Phobos modules if you don't want to.
  • That's not what the Tangobos site says ... are you sure? A: Yes. That Tangobos page was written a long time ago. The author has given us permission to rewrite it as soon as we find the time.
  • Won't including two whole standard libraries bloat my executables? A: Not anymore than any other use of multiple libraries would. The only place where it is likely to matter, is where equal functionality is used from both, and thus redundant code is included in the executable.

Limitations

Here is a list of modules which have known issues at the current time.

  • object - Tango doesn't define aliases/prototypes for string, wstring, dstring, Error, bit, or printf, which are all defined in Phobos' object.d. These can all be found in Tangobos' std.compat module, however.
  • std.thread - setPriority, isSelf, getThis, getAll, pause and resume are not supported
  • std.signals - (this has been implemented and will appear in the next Tango release.)
  • ...