News for hackers. Stuff that matters.
Re:Don't run 'strings' on untrusted files by gizmo686 on Saturday October 25, 2014 @01:58PM (#8508851)
Most languages have some type of "extern C" as part of their FFI. It should be possible to use C as a langua franca between two non C languages.
Re:Don't run 'strings' on untrusted files by blinkingled on Saturday October 25, 2014 @02:12PM (#8508893)
> It should be possible to use C

Ugh, wouldn't that fall in "just because you can do something doesn't mean you actually should" category? :) Suppose I wrote the library in Go and exported some type of C wrapper and then I loaded that in Rust using Rust->C mechanism - that will load the Golang runtime in Rust! And you still got non-trivial C code to deal with anyways!

Re:Don't run 'strings' on untrusted files by gizmo686 on Saturday October 25, 2014 @04:23PM (#8509278)
If you want to interface two languages, then I do not see a way arround involving the runtime of both languages (in the same way that linking to C code still uses the C runtime). However, using my method does not actually involve any C code. "extern C" makes the compiler produce object code that can be called as if it was produced by C code; it does not produce any C code that would compile to the given object code.

Of course, it will also produce C headers to give the type information of the exported symbols, but I wouldn't call that code.