4 ms·
Hopefully any future languages that prioritize java interop will do things like implement java.util.List rather than insist on renaming "add" to "+=" along with
by jbooth 11y ago
Hopefully any future languages that prioritize java interop will do things like implement java.util.List rather than insist on renaming "add" to "+=" along with ":+", "+:", "+", "++", "++:" so that I have to constantly call .asScala, .asJava on collections while passing them around.
- yawaramin 11y agoWhy not just import the implicit Java-Scala list conversions?
- hugofirth 11y agoThis obviously comes down to personal preference but I personally prefer the explicit conversions for the added clarity.
- lmm 11y agoDisagree. The collections are different and behave differently (e.g. the Scala ones are immutable), they should look different. Explicit .asScala and .asJava make the intent clear. They should only be necessary at the boundary.