stdio line-streaming revisited
John Reimer
terminal.node at gmail.com
Thu Mar 29 00:10:34 PDT 2007
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.
Tango based projects would turn into a big mess if some tasks were mixed
haphazardly with C code for compatibilities sake. The decision, I believe,
to make Tango distinct is a very good one. This is what makes Tango
original, performant, unencumbered, and readable.
At the same time, Tango certainly doesn't prevent anyone from using C
API's, if they so choose. But I think it would be wiser and cleaner to
separate such code into "well-marked" units and leave Tango to do
what it does best. I've always had a distinct dislike for C++ source that
mixed "old" C API's with new "C++" ones. I'd love to see the day when D
is completely unleashed, that is, literally unfettered from it's C
dependency (snn.lib and libc.a no more -- ok that's excentric, but I can
wish. :D )
Tango certainly has its own ideology that attracts certain types of
programmers. For myself, I hope Tango continues to steer far clear of
anything resembling C++/C mixing and matching. C is certainly
accessible through D, but use it wisely and certainly don't force a
library design to be crippled by C compatibility.
Just an opinion.
-JJR
More information about the Digitalmars-d
mailing list