Re: Java Binding
Rene Rivera <[email protected]>
| Newsgroups | gmane.comp.lib.boost.langbinding |
|---|---|
| Organization | Redshift Software, Inc. |
| Message-ID | <[email protected]> |
John Moeller wrote: > OK, here goes. I never did find out if this is still the proper place > to submit stuff like this, so I'll assume it is. I guess I'll give it a > couple weeks and repost on devel if it doesn't get any traction here. Yea, still the place for this :-) > Now, I understand that doing a langbinding-related binding for Java may > not be in the cards. It's in the cards if you are willing to make it happen ;-) > I wasn't even able to find any langbinding source; > it's been deleted from the Sourceforge tree, and it's not in the SVN > tree or the Boost File Vault. Does it exist anywhere? I'd love to at > least play with it. It's in the HEAD CVS under the "langbinding" branch. You can get the two individual dirs for it: http://boost.cvs.sourceforge.net/boost/boost/boost/langbinding/?pathrev=langbinding http://boost.cvs.sourceforge.net/boost/boost/libs/langbinding/?pathrev=langbinding > Even if this isn't possible at this time, I think that a Java binding > would be beneficial to the community. It would. And I mentioned it as an idea long ago now. One of the big problems with a Java binding is JNI itself. Since JNI works on link symbol names it's still an open question of if it's possible to make it work with arbitrary function pointers, or function objects. > So, to sum up, I have a few (ok, many) questions: > > 1. Is Langbinding something that will return in the near future? That > is, is there still interest in pursuing the project? (I understand that > this is a hard question to answer.) There is interest. It's just not high enough priority. > 2. If so, I know that it wouldn't be as dynamic as the Python or Lua > bindings, but is a generated Java source file something that could be > accepted, at least in the near term? Sure, gota start somewhere. > In fact, now that I think about it, there are methods to define a class > file from a byte stream in ClassLoader (it's called defineClass, in > fact). You could maybe have a native method for a class that's always > available, temporarily rebind it to an implementation defined in the > module, and that module calls something that produces the byte array > full of bytecode necessary for calling the class-definition method. I'm > probably getting way ahead of myself, though, and I don't even know if > that would work. Hm, interesting... The one other idea I had was to have the C++ side generate dynamic symbols at load time. But that sounds way harder now than doing a custom ClassLoader. > 3. If Langbinding is more of a long-term return goal, or it has been > shelved permanently, would creating a Java binding be a worthy effort? Yes, it would be worth it. > There are many such efforts out there; does it have a place in Boost? Yes. > If so, should it look like Boost.Python or Luabind? Should it have its > own identity? Would it be advantageous to try to code it to the > Langbinding interface, so that it could be adapted were Langbinding to > be revived? Hm, good questions. I personally would like to see more work done on Langbinding. But I won't cry if you don't work with it. > Regardless of the answers to these questions, I think that I'll try to > at least invent something that aspires to be a Boost.Java, even if I > don't ever submit it. :) Cool. Look forward to seeing the results. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/