The D/Objective-C Bridge 0.2

Michel Fortin michel.fortin at michelf.com
Mon Jan 14 20:34:14 PST 2008


On 2008-01-14 12:41:48 -0500, Carlos Santander <csantander619 at gmail.com> said:

> Any chance of making this Tango compatible?

I suppose it shouldn't be too hard as I'm only using a few things from 
Phobos, namely:

- std.string : mostly for toStringz
- std.c.args : for _argptr, to wrap NSLog which is variadic (but the 
wrapping isn't done so well)
- std.utf : to support the interesting concept of subclassing NSString 
to encapsulate a D string
- std.gc : for adding a root to the D class in the Objective-C capsule 
object's memory
- std.traits : to get the list of fields of an object (method 
definitions are mixed in as fields)
- std.metastring : for converting numbers to strings in some 
compile-time error messages
- std.c.stdlib : for malloc and free, used in the conversion of some 
obscure, unnecessary, runtime macros for the Objective-C runtime which 
could probably be removed
- std.typetuple : for the simplistic TypeTuple!() template

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?

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d-announce mailing list