<div dir="ltr">Hi Ben,<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 24, 2015 at 6:20 AM, Ben Coman <span dir="ltr">&lt;<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Just had a curious thought I could not find the answer from poking around...<br>
<br>
Is Slang able to make use of the FFI interface?  I see things like<br>
file primitives with C-code scaffolding around system calls, and<br>
wonder if this C-code could be reduced by Slang calling directly to<br>
system functions through FFI, with scaffolding written in Slang?<br>
<br>
Does that make any sense?<br></blockquote><div><br></div><div>Yes it makes sense but it isn&#39;t a benefit. You&#39;re saying that the FFI can provide the marshalling that is written manually in plugins.  But given that the plugins are already written it doesn&#39;t really get us anything.  You&#39;d have to introduce a specification language between the plugin&#39;s primitive interface and given C calls that Slang would translate into suitable marshalling code to cut out the human author.  Seems to me that&#39;s a lot of effort to auto-generate a small amount of code.  I think more interesting is writing direct to the FFI.</div><div><br></div><div>But people have discussed taking a functional interface written w.r.t. the FFI and autogenerating a plugin for it, to provide the security and encapsulation benefits.  Thing is, would it be part of Slang or part of the FFI?  Perhaps it could use elements of both.  But I&#39;m not sure there&#39;s enough use cases to justify the effort.</div><div><br></div></div><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>