<div class="gmail_quote">On 21 February 2012 22:33, H. S. Teoh <span dir="ltr"><<a href="mailto:hsteoh@quickfur.ath.cx">hsteoh@quickfur.ath.cx</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 Tue, Feb 21, 2012 at 08:01:11PM +0000, Iain Buclaw wrote:<br>
> On 21 February 2012 17:10, Manu <<a href="mailto:turkeyman@gmail.com">turkeyman@gmail.com</a>> wrote:<br>
</div>[...]<br>
<div class="im">> > With the (typically VM based) languages I was referring to, there's<br>
> > no direct linkage, all communication must be via some API, so the<br>
> > intrinsic knowledge of foreign structures is not necessary in that<br>
> > case. You would always need to understand the layout or contents of<br>
> > foreign structures via some sort of marshalling api/class, since the<br>
> > VM is free to do whatever it likes internally.<br>
<br>
</div>Doesn't JNI define the standards as to how things are laid out?<br>
<div class="im"><br>
<br>
> You will need to know where things are with Java Classes, so I would<br>
> have thought that would be a very problematical issue for you...<br>
> Although D (gdc) follows a similiar but not identical ABI to Java<br>
> (vtable should be located in the same area).<br>
</div>[...]<br>
<br>
Can Java data structures even be mapped to D types at all? Don't you<br>
already have to marshall/translate data structures anyway?</blockquote><div><br></div><div>I'm talking about a function calling system, not understanding foreign data types. I think that's way beyond the scope of 'extern(x) function()'</div>
<div>There are already many examples of designs to understand foreign data structures. The Lua bindings had pretty nice designs for that I though...</div></div>