1

I am trying to port a simple java project over to Frege for practice. I spent a bit of time looking for bindings for java.nio.file.Path, among other things. I found https://github.com/Frege/frege/blob/master/frege/java/IO.fr, which is close, but no nio there. Next I thought I would just do it by hand or try https://github.com/Frege/frege-native-gen.

Okay, so my question is "what is the recommended way to do java bindings"? This question is not just limited to java.nio.*. More specifically, if I cannot find the bindings I want, should I

  1. Look in some standard project for them and contribute my own if I cannot find them?
  2. Use the generation tool to create my own?
  3. Do something else not mentioned here?
Justin Thomas
  • 283
  • 1
  • 6

1 Answers1

1

This would depend on the situation. For example, it is often the case that you can get your project going with 2 or 3 native definitions.

OTOH, contributing a new module with Java SDK bindings is most welcome. But note that it's not always trivial, since the native gen tool most often creates code that needs close examination and manual improvement.

The rule is that the Java SDK should be supported out of the box (it isn't yet as you've discovered). For other libraries there may be existing projects it is worth looking for.

Ingo
  • 36,037
  • 5
  • 53
  • 100
  • Where do I find some guidelines for the "manual improvement" part. I would like to contribute to Java SDK bindings but am afraid I don't know how to tell what is right and what is wrong. – Justin Thomas Oct 05 '16 at 21:46
  • Since the answer would be too long to fit in a comment, and this would probably a topic of interest for others, I'd ask you to open a new question like "How to manually improve automatically generated Java bindings." or something like that, and I promise to answer extensively. – Ingo Oct 06 '16 at 17:00