My Android project nearing beta

Adam D. Ruppe destructionator at gmail.com
Wed Jan 1 18:15:32 UTC 2020


On Wednesday, 1 January 2020 at 17:35:28 UTC, Adam D. Ruppe wrote:
> bindings generator

oh one thing I forgot to mention on this is that right now it 
generates interfaces, but doesn't list them; each class is just

class Foo : IJavaObject {}

instead of

class foo : ActualParent, IWhateverElse {}


All that is possible, of course, and would probably be pretty 
useful. But I didn't do it for the same reason everything is 
listed `final` right now - doing so would mean the vtable needs 
to be populated... which means the linker is going to go looking 
for those implementations. 4000 classes of implementations (and 
ungodly build time) forced on you when you probably only want a 
handful.

so.... well, this is my solution until it is dead or I find 
something better.

I do think interfaces are important long term, and since JNI 
actually dynamically binds by name there's a few options 
available to me to make it work, even with the lazy linking.

But for now if you look in the source, there's this stuff and a 
bunch of reinterpret cast FIXME comments in places where 
something needs to change for full support. just even without all 
that this is still pretty useful!


More information about the Digitalmars-d-announce mailing list