Hi, Currently, we're working to implement a new Java API and would like some feedback from the community on an implementation detail. In short, the new Java API will use the existing Scala API (in a manner similar to how the current Clojure API works). This basically means that we're making Java friendly wrappers to call the existing Scala API.
The feedback we're looking for is on the implementation of NDArray. Scala's NDArray has a significant amount of code which is generated via macros and we've got two viable paths to move forward: 1.) Change the macro to generate Java friendly methods - To do this we'll modify the macro so that the generated methods won't have default/optional arguments. There may also have to be some changes to parameter types to make them Java friendly. The big advantage here is that ongoing maintenance will easier. The disadvantages are that we'll be changing the existing Scala NDArray Infer API (it's marked experimental) and Scala users will lose the ability to use the default and optional arguments. 2.) Leave the existing macro in place and add another which generates a Java friendly version - The biggest issue here is that we'll be doubling the number of macros that we've got to maintain. It'll become even more overhead once we start expanding the Java API with more classes that use generated code like this. The advantages are that the existing Scala NDArray Infer API would remain unchanged for Scala users and that the new macro could be optimized to give the best possible experience to the Java API. Thanks, Andrew