If I'm trying to Kotlinize and add some convenienc...
# announcements
d
If I'm trying to Kotlinize and add some convenience to this Java API where there's `Thing SomeSingleton.getThing(String)`(a lookup method which may return null), what would be the most idiomatic way to add this to CharSequence?
fun CharSequence.getThing(): Thing?
or
val CharSequence.thing: Thing?
feels wrong because it makes seem like the Thing belongs to the CharSequence.
fun CharSequence.toThing(): Thing?
feels wrong because it seems like this should throw an exception if the Thing is not found I'm not really sure what's left. Thoughts?
d
Oh, nice. Thanks