The D/Objective-C Bridge 0.2

Anders F Björklund afb at algonet.se
Tue Jan 15 01:17:13 PST 2008


Michel Fortin wrote:

> I don't expect any of this to be very hard to find an equivalent in 
> Tango. If someone wants to give it a try, great! I suppose I could even 
> help.
> 
> But I can't say I'm interested much in maintaining two parralel versions 
> of the bridge right now. Aren't Phobos and Tango merging anyway?

If it's only a handful of items, you can use conditional compilation 
like: "version (Tango) { ... } else /* Phobos */ { ... }" instead :

version (Tango)
import tango.io.Stdout;
else // Phobos
import std.stdio;

void main()
{
   version (Tango)
   Stdout ("Hello, World!").newline;
   else // Phobos
   writefln("Hello, World!");
}

Gets really painful, not to mention ugly, with larger diffs though.
wxD is somewhere in the borderline*, but still coping with both...

--anders

* especially "string" has been trouble with Phobos/Tango and 1.0/2.0
but it's starting to settle down to a single "toString()" method now



More information about the Digitalmars-d-announce mailing list