So I'm sure lots of people will think that this definitely doesn't qualify as "Best language to share code...", but Haskell has stuff for getting web, desktop, iOS, and Android out of one code base. It's called Obelisk ( https://github.com/obsidiansystems/obelisk ) and it's actually getting to be a pretty good development experience.
I love hacker news. This is the comment I came here for. Just use this : A language that is (at best) fringe on the platform you are using. Here's a toolset nobody has ever heard of. Now build your mission critical bit of infrastructure on this house of cards, wait for the toolset maintainers to be outpaced and under-resourced by underlying OS/platform changes and then have to rewrite the whole thing which if it does…
A bit of nowadays tech scaled out from pet projects.