How D addresses the problem of Extending and/or Embedding other languages ?
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 26 07:46:55 PDT 2014
On 26/08/14 13:40, "Marc Schütz" <schuetzm at gmx.net>" wrote:
> I've heard about them, but I don't know any details. Anyway, the way
> Ruby works, they either need to restrict the language, include a full
> interpreter/jitter, or at most they could only translate it to a very
> abstract level. Like for an expression like `a + b` generating a call to
> a helper function like `send(_var_a, SYMBOL(":+"), _var_b);`, and hoping
> that the compiler backend can eliminate this in some cases.
It's implemented on top of Objective-C.
Yeah, it needs to be able to interpret or JIT, otherwise a lot of meta
programming and things like "eval" won't work. Although, I'm not sure
about RubyMotion. I don't think you can use regular Ruby gems out of the
box with RubyMotion.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list