D/Objective-C: hit a dead end, start anew

Jacob Carlborg doob at me.com
Fri Sep 17 02:06:24 PDT 2010


On 2010-09-17 01:46, Michel Fortin wrote:
> <http://michelf.com/weblog/2010/dobjc-dead-end-start-anew/>
>
> The D/Objective-C bridge is a project that was aiming at making Cocoa
> usable from D.
>
> It's somewhat similar to QtD. The timing of this announcement isn't
> entirely coincidental with today's announcement about QtD: my
> announcement was ready, QtD's was the trigger for my Publish button.
> Even though the problems are probably quite different between the two
> projects, they both share a common need for runtime-reflection, playing
> with the object model from another language, static initialization from
> within mixins that shouldn't create circular module dependency, and
> probably a couple others.

Are referring to the need for calling a static method on a class that 
should be able to be loaded from a nib? In that case have you tried, at 
runtime, inspecting the symbol table in the loaded binary and getting 
the address to the necessary functions and calling them.

> It is my feeling that for dealing with Objective-C, things will be much
> cleaner by working directly inside of the compiler. D templates are
> fabulous, and I'm quite amazed that I could do what I did, but the
> bridge creates just too much generated code to make the whole thing
> usable. So I think it's time for a new approach.

I noted this as well, it creates an insanely amount of code. I also 
noted that compiling as a dynamic library reduces the size about 50%.

I've actually been working on my own implementation of an Objective-C/D 
bridge based on your blog posts and documentation. I've never released 
or announcement anything but I have a project at dsource: 
http://dsource.org/projects/dstep . I started this before your bridge 
supported DMD because of no support for DMD or Tango and I was not happy 
with the GPL license. I also added small enhancements in some places.

I also have ruby scripts (based on bridgesupprt) for automatically 
creating bindings with results that are ok but not perfect. I was 
thinking about create a tool using Clang and hopefully have a completely 
automatic process when creating bindings.

What would you say about working together on an Objective-C/D bridge?

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list