For JVM and .NET/CLR based languages this is pretty easy and common.
> just need to write some cross platform libraries that wrap UI, networking, etc for each platform.
Congratulations, you've invented the JVM.
I'd be curious to know why that is, given that once you have a few languages working, adding more on, intuitively (I have no experience in this) wouldn't be too difficult, given how many features the languages share?
In Elements we spent a lot of time on getting it right, and I think we have most edge cases covered for user code. The way generics are used in the Swift runtime library seems impossible to map perfectly on top of the concept of generics as C# has them though.
The « low level language » is actually LLVM intermediate language, and LLVM already support building for all the major targets.
For example write code in Swift, compile to X, compile to Kotlin. Voila, I have cross platform code, just need to write some cross platform libraries that wrap UI, networking, etc for each platform.
Elements compiler [0] seems to do just that. Does anyone have experience using it in production? Why is this not being adopted as a viable cross platform solution?
[0] https://www.elementscompiler.com/elements/#platforms