8 ms·
Using anything build in Scala from Java is abysmal. Have fun with no default parameters, creating Seq$.MODULE$ everywhere etc. I'm not from US, so I've never ha
by KptMarchewa 5y ago
Using anything build in Scala from Java is abysmal. Have fun with no default parameters, creating Seq$.MODULE$ everywhere etc. I'm not from US, so I've never have seen so much dollars anywhere.
- hardlianotion 5y agoI 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.
- KptMarchewa 5y agoI agree - unfortunately I work with 3rd party scala code in this case.
- lmm 5y agoYou 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.
- KptMarchewa 5y agoI 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.