Tango compatability with Phobos

Yigal Chripun yigal100 at gmail.com
Sun Oct 14 13:30:47 PDT 2007


Kris wrote:
> From all the threads so far, this is what I've surmised:
> 
> For those people who need to run Tango-based and phobos-based code 
> side-by-side, it appears to be fine that the higher-level elements are 
> different. As long as the principal modules of both operate happily on some 
> common runtime package, then it's cool.
> 
> Based on that assertion, we'll make some changes and get it working. If the 
> assertion is not correct, then please say so ...
> 
> - Kris
> 
> 
> 
> "Charles D Hixson" <charleshixsn at earthlink.net> wrote in message
>> I don't feel that one needs to be able to use both libraries in the same 
>> module, but when linking modules together it is important that it not 
>> matter that they have been compiled with the same library.
>>
>> I.e., if I get library A from one source and library B from another 
>> source, I should expect to be able to link both into my program...and it 
>> shouldn't matter whether I'm using Phobos or Tango, or which the libraries 
>> used, except insofar as dependencies that need to be satisfied.
>>
>> For that matter, if one file is opened with one library, I don't insist 
>> that the other library be able to operate on it without closing and 
>> reopening it.  (EXCEPTION:  stdin, stdout, and stderr should be dealt with 
>> using methods that are compatible and allow interleaving...though this 
>> might be allowed to affect the order of line transmission on a 
>> line-by-line basis.) 
> 
> 
i'm just one person, but IMHO isn't that just a patch of sorts for the 
near future?
I do realize that's merging both phobos and tango is a lot of work. With 
your suggestion all we get is a standardized runtime, Which is by itself 
a very important thing, but for the long run, D needs a standard library 
too, which is to say a standard API.
Until we reach a merged, agreed by all one API, there is no standard 
library for D in my mind.
my personal preference would be to discard phoboes (i don't want the C 
runtime unless i asked for it explicitly...) and use the tango code 
base, of course after fixing the problems In the API people mentioned in 
the NG and adding missing features from phoboes to tango.
for example the console interface should be simplified as others suggested.
i think Tango is better designed and it would be easier to add to tango 
rather than than redesigning phoboes.

besides those rough edges tango is great so keep up the good work :)
thanks for working on this great project!

please comment if you agree/disagree with me.

P.S
i'd prefer either be able to import Cout and just have two functions 
like print/println with formatting, or changing Cout to out (no upper 
case letters, and without C-style shortcut names)
I prefer more readable java style with camel case full names rather than 
c/c++ 3 letter abbreviations like ptr instead of pointer, buf instead of 
buffer and etc.. (we all know that we read code a lot more than we write 
it, so it's better to write longerIdentifierNames which would be easier 
to read and understand later)



More information about the Digitalmars-d mailing list