3 ms·
As a .NET guy, I want to say to following to Java folks: You're welcome to copy P/Invoke!
by stevefan1999 4y ago
As a .NET guy, I want to say to following to Java folks: You're welcome to copy P/Invoke!
- kaba0 4y agoI don’t get your point, isn’t it pretty similar to Java’s Panama in its goals? Is it considered very good or you are being sarcastic and it’s bad?
- Godworrior 4y agoThis is one level below P/Invoke. It just offers a linking runtime API. There's also a tool that can generate all the bindings from a C header file automatically: https://github.com/openjdk/jextract https://github.com/openjdk/jextract Then it doesn't really matter whether annotations are used or not, or some more low-level linker API (like FFM went with). As a user you just call into the generated bindings. That's the philosophy: the JDK provides the low-level capabilities, and jextract provides the 'civilization', i.e. a usability focused layer on top. One of the advantages is that the JDK doesn't compete with other existing solutions, and those existing solutions can benefit from the new linking runtime APIs as well.