Initially (i.e. the first phase of migration), I would say that you don't want to export an API (interface/public method etc) with a hard-to-use-from-Java scala construct.
In practice I would limit this to exporting anything which is scala-specific (again, I'm talking about the first phase of migration here):
- scala library classes (function types, collections etc)
- higher-kinded generic type signatures
- implicits
So what does that leave? Well, the internals of classes (private methods, fields etc) can be converted to use scala constructs and library classes.
If you have any APIs (especially client-facing APIs which you intend to migrate), I would design them anew from the ground up in Scala; initially using a Java back-end. Then I would slowly eat away at the code inbetween.
Of the points you have highlighted, I would agree that the immutable paradigm of Scala and the mutable paradigm of Java do not mix well. The other points I have found less problematic.
Another main point of paradigm-mismatch is how to convert any concurrent code you have (i.e. that which makes use of java.util.concurrent
). This can, of course, be converted as is but the question is whether to replace the concurrency model based around locking with one based around actors or STM. In either case, this is also likely to be a complete redesign, as opposed to a conversion per se.