Custom calling conventions

Jacob Carlborg doob at
Tue Feb 21 10:12:43 PST 2012

On 2012-02-21 18:03, Manu wrote:
> On 21 February 2012 16:59, Michel Fortin <michel.fortin at
>     I have some experience bridging Objective-C and D. I once built a
>     complete wrapper system for Objective-C objects, each object was
>     wrapped by a D one. It worked very well, but it generated so much
>     bloat that it became unusable as soon as I started defining enough
>     classes for it to be useful. See the D/Objective-C bridge:
>     <
>     <>>.
> What was the primary cause of the bloat? I can't imagine my proposal
> causing any more bloat than the explicit jni call (or equivalent) woudl
> have otherwise.

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 

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.

/Jacob Carlborg

More information about the Digitalmars-d mailing list