Let Go, Standard Library From Community

Mike Parker aldacron71 at yahoo.com
Wed Apr 18 03:57:44 PDT 2007


eao197 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).

Or they can do what I did with Derelict and add a module to the library 
that wraps Phobos/Tango calls. It only needs to wrap the 
functions/objects the library actually uses. Admittedly, there is a 
problem if you use standard library calls extensively, or if you use 
features of one library that aren't (yet) available in the other (such 
as the Zlib and ZipArchive modules in Phobos). But in that case, unless 
your library is intended to make money for you, why worry? And if it is 
commercial, then you have good incentive to implement missing 
functionality anyway.



More information about the Digitalmars-d mailing list