how do you usually deal with interoperability when...
# announcements
d
how do you usually deal with interoperability when it makes sense for kotlin to return
String?
, but it makes sense for java to return
Optional<String>
?
m
My advice is if you expect to be called from Java that you don’t control (and therefore won’t eventually convert to Kotlin). If so, then
Optional
, otherwise annotate as nullable.