Hacker News new | past | comments | ask | show | jobs | submit login

Probably not. While it wasn't intended to be so, JavaScript has become the lingua franca of web browsers and is therefore heading towards a future of being a compilation target. If your program can't compile to JavaScript, it doesn't really run on browsers (in much the same sense as "If your program can't be compiled to x86 assembly, it doesn't really run on computers").

https://www.destroyallsoftware.com/talks/the-birth-and-death...




It seems to me that we should really be looking for browsers to compile (or at least appear to compile, even if they skip this as an optimization) Javascript into a lower-level 'assembly' language, so that Dart can be made to compile to the same form. A LLVM for browsers, basically.

JS is a terrible assembly language. But the work that's been done on making it passable for that purpose is remarkable, so we're getting by with it.


You have to ask yourself if it's easier to get all browser vendors to agree on an intermediate language or to get them to agree on new apis that makes javascript better for that purpose.


It's easier to make them agree on an intermediate language. Mostly because one can make such VM as a BSD licensed plugin.

Just make the DOM available as some virtualized "system calls" and you'll avoid the fate of Java and Flash.


What's a plugin?

Is that one of those things that "nobody" willingly installs in their browser unless they absolutely have to because much of the market doesn't even understand what they are and the ones that do still want to avoid them because they decrease browser stability?


Whatever it is, somehow most people still have Flash installed on their computers, and a lot of them have Java.


Those are two of the exceptions to the rule.

Quite literally; there is a section of the Mozilla browser codebase that actively seeks out those plugins (along with QuickTime, Windows Media Player, and Acrobat Reader) because users who lack them experience a "broken web" (http://lxr.mozilla.org/mozilla-central/source/dom/plugins/ba...).

I'm not saying becoming one of those plugins is impossible---clearly, it's been done more than zero times. I'm saying that I really wouldn't base any business decisions around the assumption that it will happen for your plugin.


Alternatively, make a new type of browser that completely replaces Javascript, make it popular and leave the old world behind.


You'll never get adoption for a new browser that can't parse existing websites, unfortunately. There's no 'clean break' option.


People adopt new things all the time. Look at what happened when smart phones came long - everybody started making apps for them. I think people on smart phones spend more time in apps than they do on the web.

Anyway, the new browser could totally embed another browser engine to show legacy web pages.


New browser that fully supports existing technologies is probably the best option.

Similarly, there's nothing technically stopping someone from building a new scripting core in the browser itself and then implementing the JavaScript engine atop that (other than the need to support a brand-new untested framework in an environment of high-performance already-existing JavaScript engines, of course).


> heading towards a future of being a compilation target

Having to trace/debug compiled javascript from another language is a horrific future. In your analogy, C programmers would have to debug assembly.

I agree it's the most probable future, but let no one call it innovation when it's simply resignation from lack of options.


There's no reason Javascript can't get better at being the assembly language of the web, including making debugging of other languages easier.


You haven't heard of source maps then.


"Having to trace/debug compiled x86 machine code from another language is a horrific future."




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: