Instance itteration

From the language design would having type check loops be efficient i.e

libraries.filterIsInstance<StaticInteropLibrary>().joinToString { it.paths.joinToString { "-L$it" } }
 libraries.joinInstanceToString<InteropLibrary,StaticInteropLibrary>().joinToString{ it.paths.joinToString { "-L$it" }}

I am not sure I understand your question. But instance filtering is quite efficient nowadays. If you have some problems (and you see them on profiler), you can create your own extension for this case.