Let Go, Standard Library From Community
eao197
eao197 at intervale.ru
Wed Apr 18 03:51:45 PDT 2007
On Wed, 18 Apr 2007 14:27:10 +0400, Daniel Keep
<daniel.keep.lists at gmail.com> wrote:
>> I think problem of Phobos/Tango incompatibility affects not application
>> writers, but libraries writers. If someone writes some application
>> domain library (XML parsing, SOAP support, event-driven framework and so
>> on) then he/she can use Phobos or Tango, but this choice divides users
>> of than library to Phobos-only or Tango-only. An attempt to write big
>> library which can work either with Phobos or Tango would lead to
>> undesirable amount of version statements in code (as in good old C/C++
>> times with many #if/#else).
>>
>> --Regards,
>> Yauheni Akhotnikau
>
> I've been writing an XML SAX parser based on Expat, and it supports both
> Phobos and Tango; it wasn't much work at all. A few aliases and version
> statements, and I'm good.
I said not about D-wrappers around existing C/C++ libraries but about
'native' D libraries. For example, to use D on my work I need to make
D-port of (at least) 3 our C++ libraries (for configuration files, data
serialization, event-oriented programming). Because the existing
C++ libraries heavy use C++templates it isn't possible to make D wrapper
around existing code.
> Also, this seems a bit like the difference between writing a library for
> just the standard C++ libraries and, say, MFC or wxWidgets. I still
> think it's a little early to be shoving Phobos out the door into the
> cold, dark night with nary more than a "thanks, it's been great but I'm
> seeing someone else now" based on what we think might happen at some
> indeterminable point in the future.
I didn't speak about throwing Phobos away. Phobos is a good library. And
it should be here because D is a multiparadigm language, so in some
circumstances C-like Phobos library much more appopriate then fully
object-oriented Tango library.
But it is a sad situation when some application can't be link against
Phobos-based and Tango-based libraries at the same time. I hope that
Walter and the Tango team find the solution for that problem.
--
Regards,
Yauheni Akhotnikau
More information about the Digitalmars-d
mailing list