stdio line-streaming revisited

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Thu Mar 29 09:09:40 PDT 2007


Bill Baxter wrote:
> John Reimer wrote:
>> On Thu, 29 Mar 2007 15:19:40 +0900, Bill Baxter wrote:
>>
>>> kris wrote:
>>>> Andrei Alexandrescu (See Website For Email) wrote:
>>>> - Tango is for D programmers; not C programmers.
>>> D programmers sometimes like to call 3rd party code written in other 
>>> languages, and pretty much any interop in D has to happen via C 
>>> compatibility.  E.g. pyD.  So I'm guessing if my D code calls on some 
>>> Python code that prints to the console that somewhere down the line 
>>> that eventually ends up on C's stdout.  I could be wrong, but at 
>>> least that's why I *think* Andrei and Walter keep saying that C 
>>> compatibility is important.
>>
>>
>> It's only important for those that are determined to use it, perhaps
>> because of persistant programming style or unrelenting attachment to C++
>> methods (where C and C++ seemed to keep an unholy matrimony). I'd hate to
>> see a D library infected with a C compatibility requirement -- support 
>> for
>> ugly C design decisions would most certainly taint Tango for the worse. I
>> believe Tango was made to help D step beyond that.
> 
> I believe the current discussion is only about under-the-hood 
> implementation issues.  So I don't think you have to worry about any D 
> libraries exposing (good or bad) C/C++ design decisions to users.  Tango 
> is going to expose the same D interface no matter how it's implemented 
> under the hood.

That's great, however the interface has a problem too: it does not 
produce atomic strings in multithreaded programs.

Andrei



More information about the Digitalmars-d mailing list