JS isn't a very fast language, but a million person-years of efford have gone into optimizing it and WASM pushes that even farther. Since any language is Turing complete, and any language can be compiled to any other, the only thing a new native execution engine really offers is performance. It's not clear that your new execution format would be that much better. The Chrome team spent over a year working on a new system called Oilpan to enable GC to work across the DOM, JavaScript, and (in theory) Dart. In particular, the garbage collectors need to play together. The interactions are pervasive, subtle, and complex. A single DOM object could be created in JavaScript and then get an event handler written in your new language, which in turn calls some DOM method on another object that is actually written in JS, etc. Now that desktops are saturated, growth areas for browsers are mostly on mobile and especially mobile users in developing countries on cheaper devices. This is especially true because browsers are generally trying to get smaller. Very few browser teams would ever sign up for an obligation of that scale. Once it's in the browser, removing it would break the web, so you're stuck with it forever. That's almost two million lines of code that has to be written, documented, security audited, maintained, refactored, etc. Ignoring all of the political considerations, which are sufficient to sink almost any attempt like this, it is technically very hard:Ī high performance language implementation is a ton of work, a lot of code, and a huge amount of complexity for a browser to take on. Hi, I work on Dart which was probably the highest profile (or second highest after WASM) attempt to get a new execution format directly supported by browsers. If you and a friend both want to work on a project where the two of you would need to write client-side scripts for a web-page, then the two of you probably already know JavaScript. Sure there would be more choice with JavaScript still being around, but the power of JavaScript is that you can't really use anything else. Supporting both languages would probably be a problem though, because it would probably cause rifts in the web development community (that's what I would see happening, at least). Otherwise you'd have a web browser couldn't support the majority of sites we have right now. Not to mention that all web sites supported by major browsers are written in JavaScript, so the browser would have to support whatever's replacing JavaScript AND JavaScript.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |