<div class="gmail_quote">On 21 February 2012 20:12, Jacob Carlborg <span dir="ltr"><<a href="mailto:doob@me.com">doob@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 2012-02-21 18:03, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 21 February 2012 16:59, Michel Fortin <<a href="mailto:michel.fortin@michelf.com" target="_blank">michel.fortin@michelf.com</a><br></div><div class="im">
    I have some experience bridging Objective-C and D. I once built a<br>
    complete wrapper system for Objective-C objects, each object was<br>
    wrapped by a D one. It worked very well, but it generated so much<br>
    bloat that it became unusable as soon as I started defining enough<br>
    classes for it to be useful. See the D/Objective-C bridge:<br></div><div class="im">
    <<a href="http://michelf.com/projects/__d-objc-bridge/" target="_blank">http://michelf.com/projects/_<u></u>_d-objc-bridge/</a><br>
    <<a href="http://michelf.com/projects/d-objc-bridge/" target="_blank">http://michelf.com/projects/<u></u>d-objc-bridge/</a>>>.<br>
<br>
<br>
What was the primary cause of the bloat? I can't imagine my proposal<br>
causing any more bloat than the explicit jni call (or equivalent) woudl<br>
have otherwise.<br>
</div></blockquote>
<br>
Template bloat. Every call bridging D/Objective-C is made throw a series of templates. This is for making it possible (less verbose) to create bindings.<br>
<br>
It might be possible to decrease the template bloat by having a tool that automatically generates the bindings and outputs what the templates do inline.</blockquote><div><br></div><div>Why aren't the templates inline themselves? Although if the templates do a lot of work, wouldn't that INCREASE the code volume?</div>
<div>I can't really imagine how Obj-C linkage could bloat so much, what was involved? What did you have to do in addition to what a regular Obj-C function call would have done?</div></div>