Why Ruby?
Michel Fortin
michel.fortin at michelf.com
Sun Dec 19 13:02:16 PST 2010
On 2010-12-19 11:11:03 -0500, Jacob Carlborg <doob at me.com> said:
> I can clearly see that you haven't used an Objective-C/D bridge. The
> reason (or at least one of the reasons) for which Michel Fortin (as
> well as I) gave up the Objective-C/D bridge and started to modify DMD
> is template bloat. I'm not saying that using template strings as
> lambdas is going to bloat your executable/library as much as the bridge
> does but I always think twice before adding a template to my code.
I also want to add that the code bloat in the D/Objective-C bridge was
more because the bridge needed to create two stubs for each method in
all Cocoa classes, and those stubs contained code to translate
exceptions from one model to the other. Using templates and mixins made
the creation of those stubs easy, but I don't think another method of
generating these stubs would have faired better.
So the bloat came from the approach (generating stubs for everything)
much more than the implementation choice (templates). The new approach
is to avoid having to generate stubs by exposing directly the
Objective-C objects rather than wrappers around them. Less wrapping,
less bloat.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list