I was thinking since there are solutions that are transpilers, that compile custom languages like Clojure, Python into JavaScript; will the browsers ever ship with transpiler solutions by default?
Is it too esoteric of an idea?
I think it's inevitable that something other than JS will be adopted eventually, but we could be talking quite a lot of years before it's natively supported in all the browsers you need to support. Which is the same as saying: we'll be transpiling to JS for the forseeable future.
Google made a play with Dart a few years ago; but for a variety of reasons the developer reception to Dart was cool at best. They cancelled the idea of supporting Dart natively in Chrome and focused on transpiling to JS.
Web Assembly is really interesting in that it's not aimed at being a broadly-written language, so much as a powerful/high-performance transpilation target (github.com/WebAssembly/design/blob/master/HighLev…). Plus it has representatives from the major browsers and so has a reasonable chance as far as web standards ever go.
So when you take stock:
So basically it's transpilers all the way down, but we should eventually have a target language that runs as fast as the browser's own code.
Browsers will never ship with a transpiler, but there is a major effort being made to ship web assembly. This will allow a common language to be compiled to. I think that is kind of along the lines of what you are talking about.
Lorefnon
Open Web Enthusiast
In near future browsers will ship with something that is better than transpilation (to js, that is).
W3C community group is working on an open standard called Web Assembly which is a new portable, size- and load-time-efficient format suitable for compilation to the web.
It is a better option than compilation to javascript because:
While the spec is not yet set in stone, multiple browsers have introduced preliminary WebAssembly support already.