How D addresses the problem of Extending and/or Embedding other languages ?

Ola Fosheim Gr via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 25 00:37:27 PDT 2014


On Monday, 25 August 2014 at 07:18:51 UTC, Brost wrote:
> language, I can't see any facility in the standard D library or
> in the language that can help me retain the type safety, the
> memory management, and all the other things I talked about while
> interfacing with another language .
>
> for example how do you correctly expose a given D data structure
> to a scripting language of your choice ?

Wouldn't that depend on the scripting language? But you can 
control layout of structs and might be able to print out other 
information you need using reflection, so you might be able to 
create the stubs you need using traits and properties?

The gc accepts foreign root pointers, but the gc itself might be 
too slow. So you would rather use v8s gc and @nogc in D?


More information about the Digitalmars-d mailing list