www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D1, D2, Tango, Phobos, Std, Runtime

reply "Paul" <phshaffer gmail.com> writes:
I was reading a wiki about D and it talked about Tango vs. 
Phobos.  I read some items on runtime vs. standard libraries as 
well.  I am bit confused about all of it.  Are the standard 
libraries compiled into every exe and then the runtimes linked as 
needed?  Are they all or nothing entities?  In other words if I 
need a function to I have to include the whole library in my exe? 
  Is Tango the latest and Phobos the original?  Which should a new 
programmer start with?  Appreciate your patience(s).
Apr 06 2012
next sibling parent "Jesse Phillips" <Jessekphillips+D gmail.com> writes:
On Friday, 6 April 2012 at 15:28:38 UTC, Paul wrote:
 I was reading a wiki about D and it talked about Tango vs. 
 Phobos.  I read some items on runtime vs. standard libraries as 
 well.  I am bit confused about all of it.  Are the standard 
 libraries compiled into every exe and then the runtimes linked 
 as needed?  Are they all or nothing entities?  In other words 
 if I need a function to I have to include the whole library in 
 my exe?
  Is Tango the latest and Phobos the original?  Which should a 
 new programmer start with?  Appreciate your patience(s).
D2 Phobos Tango is compatible with this configuration, https://github.com/SiegeLord/Tango-D2 Don't worry about the old details of D1.
Apr 06 2012
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
Paul:

 I was reading a wiki about D and it talked about Tango vs. 
 Phobos.  I read some items on runtime vs. standard libraries as 
 well.  I am bit confused about all of it.  Are the standard 
 libraries compiled into every exe and then the runtimes linked 
 as needed?  Are they all or nothing entities?  In other words 
 if I need a function to I have to include the whole library in 
 my exe?
  Is Tango the latest and Phobos the original?  Which should a 
 new programmer start with?  Appreciate your patience(s).
On Windows I suggest D2 with Phobos. (Tango too is an option, but it's not meant to replace Phobos any more). I suggest to start with the 2.058/2.059 DMD compiler (but later LDC2 or GDC are an option). The runtime is not a replacement for the standard library. Normally Phobos is compiled statically in the binary (there are ways to avoid this), but only a small part of Phobos will be put in your binary, usually a little more than the induced tree of functions you use. Bye, bearophile
Apr 06 2012
prev sibling parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Fri, Apr 06, 2012 at 05:28:37PM +0200, Paul wrote:
 I was reading a wiki about D and it talked about Tango vs. Phobos.  I
 read some items on runtime vs. standard libraries as well.  I am bit
 confused about all of it.  Are the standard libraries compiled into
 every exe and then the runtimes linked as needed?  Are they all or
 nothing entities?  In other words if I need a function to I have to
 include the whole library in my exe?  Is Tango the latest and Phobos
 the original?  Which should a new programmer start with?  Appreciate
 your patience(s).
The whole Tango vs. Phobos debacle happened during D1 (which is a snapshot of an early version of D), allegedly due to some issues in Phobos. That issue no longer exists in D2, though. Phobos is now *the* standard library in D2. I don't think Tango is fully ported to D2 yet, although I heard someone was working on it, and IIRC there is a development snapshot of it available somewhere. For a new learner, it's highly recommended to go with D2 + Phobos. As for linking, currently the standard library is linked into every exe. There's a plan to eventually support runtime shared libs, but this hasn't been done yet. Well, technically speaking, only the parts that you actually use are linked into the exe: a large part of Phobos is implemented as templates, and these aren't instantiated unless you use them. Plus, even with static linking, the linker generally is clueful enough to only include code units actually referenced by your program. So if you never use std.json, for example, it won't get linked into the exe. T -- Why do conspiracy theories always come from the same people??
Apr 06 2012
parent reply Jacob Carlborg <doob me.com> writes:
On 2012-04-06 17:43, H. S. Teoh wrote:

 The whole Tango vs. Phobos debacle happened during D1 (which is a
 snapshot of an early version of D), allegedly due to some issues in
 Phobos. That issue no longer exists in D2, though. Phobos is now *the*
 standard library in D2. I don't think Tango is fully ported to D2 yet,
 although I heard someone was working on it, and IIRC there is a
 development snapshot of it available somewhere.
Tango is fully ported to D2. It has some advantages over Phobos, like a faster XML parser, cryptographic related modules and some other modules that Phobos still doesn't have. -- /Jacob Carlborg
Apr 07 2012
parent Andre Tampubolon <andre lc.vlsm.org> writes:
On 04/07/2012 07:28 PM, Jacob Carlborg wrote:
 Tango is fully ported to D2. It has some advantages over Phobos, like a faster
XML parser, cryptographic related modules and some other modules that Phobos
still doesn't have.
Tango is fully ported to D2? Really? You are talking about https://github.com/SiegeLord/Tango-D2, right?
Apr 07 2012