Two "standard" libraries???

Mike Streatfield dnewsgroup.c at talyst.me.uk
Fri Sep 14 18:11:04 PDT 2007


Derek Parnell wrote:
> On Fri, 14 Sep 2007 16:57:22 -0700, Sean Kelly wrote:
> 
>> Stewart Gordon wrote:
>>  >
>>> But I wonder how much different it would be if people didn't regard 
>>> Tango as what it isn't.  I'm not sure if this can be said without 
>>> implying disrespect to the developer(s) of Tango, but for those who want 
>>> _one_ standard library, there's Phobos, which is the _real_ standard 
>>> library, just as it was before Tango was conceived.
>> Yup.  And to be frank, I don't think any member of the Tango team has 
>> ever claimed that Tango is a "standard library."  However, this is 
>> really a semantic issue because the compatibility problem does exist, so 
>> for better or worse, it's not really possible to use Tango and Phobos 
>> together in the same app at the moment.  If you'll forgive my hubris, I 
>> /do/ believe the Tango runtime is better than the Phobos runtime, but 
>> this basically means that I think it would be foolish to just toss out 
>> the Tango runtime and turn Tango into another user-level library.  And 
>> that's why we are where we are today :-)
> 
> That is why I mentioned "consideration for each other". Both Walter and the
> Tango crew will need to give ground and co-operate to arrive at a good
> outcome for us innocent bystanders.
> 

In terms of more established languages, what seems to happen is that a 
core of the language is established as "standard". If someone 
implementing a compiler fails to implement the standard core properly, 
they are rightly taken to task over it. One of the things going for 
languages like Java and C# is the sheer amount of features in this core 
language set, which effectively constitute the language. In other words, 
functionality you can guarantee will be there when you pick up an editor 
and start coding.

On top of the core language features are modules/libraries which extend 
the core features. These don't have to be standardised, but will of 
course be affected by what's in that core set. Without a fairly stable 
set of core features you won't find long-standing proven libraries which 
use those features.

My point is that when you have two libraries seen as "standard" (you can 
argue over the meaning of the word all day, it probably won't change the 
public image of what's happening), which implement two different sets of 
core functionality, you hurt the acceptance of the language by confusing 
people and rendering code which seems to be written for the same 
language incompatible.

One of the decisions the team I'm working on has had to make this summer 
was whether to use Phobos or Tango as the core of our system. What I 
found was that my colleagues and I essentially had to learn another 
style of coding to be able to use Tango effectively, after having used 
Phobos for a few weeks. We chose to use Tango because it had some 
features we found useful, specifically the collection classes if I 
remember rightly. We did miss bits from Phobos, in particular the zip 
file reading code, which Tango doesn't seem to have an equivalent for 
yet (though the VFS components would seem to be heading in that direction).

Given that D seems to be a language whos development is driven by how 
it's used and the needs of the people using it, it is possible to back 
an argument that two different core libraries can exist together 
side-by-side. However, looking in from the outside, Tango seems to fold 
in a lot more of these core features that people want than Phobos, 
simply because there are people working on it. I'm not sure what the 
solution is, but I would definitely see the lack of a single "standard" 
library as a major concern in the uptake of the language.

In my opinion the definition of a core set of functinality should be as 
much a part of a language's definition as the syntax.



More information about the Digitalmars-d mailing list