notes on varargs

John Rose john.r.rose at oracle.com
Sat May 5 00:38:25 UTC 2018


On May 3, 2018, at 4:16 AM, Samuel Audet <samuel.audet at gmail.com> wrote:
> 
> One of the goals of JavaCPP is to figure out which features of C/C++ are actually important to use C/C++ libraries, and it turns out that varargs is not something that matters a great deal.

YMMV.  We have uses for it, starting (but not ending) with printf of hello world.

I have used a previous version of this technology with APIs that use varargs
pervasively.

> Besides, we can use the native C++ compiler to basically just do the hard work for us when required. Again, why are we trying to avoid it?

It's public record that we are engineering a replacement for the JNI interface
that is significantly more flexible and optimizable.  I hope you can help us a lot,
but your re-questioning of our basic charter is not really useful.

Your work in extracting stubs for C++ is extremely nice, and I hope we will find
a way for it to interoperate with Panama types.

> On the other hand, the ability to call inline functions and function-like macros is indispensable for many actual C/C++ libraries, but neither JNA nor JNR offer any support whatsoever for them. I hope Panama will not make the same mistake!

We aren't.

Best wishes,
— John


More information about the panama-dev mailing list