Hacker News new | ask | show | jobs
by hardlianotion 1690 days ago
I agree, it is a mess.

I had a little success by simplifying the interop layer. If you can wrap your scala code in simple classes that expose only Java-compatible structure, then you can remove additional complexity of java into scala interop.

1 comments

I agree - unfortunately I work with 3rd party scala code in this case.
You might be able to write a shim layer in Scala. Java interfaces, Scala classes that implement those interfaces and call the third-party code. That's the nicest way to do it IME.
I think that's what we plan to do. Still, it introduces some additional problems: we were able to target all the supported Scala versions with one package, now we'll have to do separate ones for 2.11, 2.12, and 2.13.