Reviewing Phobos

Sean Kelly sean at f4.ca
Fri Feb 9 17:41:31 PST 2007


Howard Berkey wrote:
> Frits van Bommel Wrote:
> 
>> Howard Berkey wrote:
>>> Tango, on the other hand, is a platform library.  It is more in the vein of, say,
 >>> the Boost C++ library, from my perspective.  It can be much larger 
and filled with
>>> things you wouldn't normally expect in a good, small std lib.
>> Boost doesn't replace the standard C++ library, it complements it. Big 
>> difference.
> 
> Ahh, I had misunderstood; I thought they were usable simultaneously.  I didn't see
 > anything that would prevent you from using them together at first
 > glance.

The runtime code.  Unlike C++, D relies on a lot of 'hidden' 
functionality to support various language features.  One of the original 
goals of Ares, and transitively for Tango, was to define a strict and 
logical separation between the core components of a D application: the 
compiler runtime code, the garbage collector, and the standard library 
itself.  One benefit of such an approach is that it allows each kind of 
developer to do their job independently of the other.  The compiler 
writer need only expose or call a specific set of predefined functions, 
and the same is true for someone crafting a garbage collector or a 
standard library.  Each component is separately compilable and need only 
be linked to the user's executable to create a complete and working D 
application.  This is discussed briefly in the Tango Advanced 
Configuration Guide:

http://dsource.org/projects/tango/wiki/TopicAdvancedConfiguration

So in essence, I believe Tango is three things: a well-defined standard 
for creating D language support code, a minimal and configurable 
user-level wrapper around this code (in the form tango.core.*), and a 
robust user library and development framework.

The result is that the visible portion of Tango is completely separable 
from the Tango runtime.  In fact, this is one reason Tango currently 
doesn't ship with a comprehensive static library (the other being 
technical issues with exposing template code from libraries).  If you 
don't care about the user-level portion of Tango, you're free replace it 
or simply get rid of it entirely.  Once the template issues are resolved 
a static library will be made available, but I do not personally believe 
it should ever be integrated with the runtime code, optimizing linker or 
no.  The purposes of each are quite distinct, and they should remain 
that way :-)


Sean



More information about the Digitalmars-d mailing list