News for hackers. Stuff that matters.
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by pcwalton on Monday September 12, 2016 @02:29PM (#12482335)
Because all of the languages supported by the browser have to interact with the DOM. DOM memory management is incredibly tricky: it will not do to just have "an agreed upon format" to exchange data between such languages. You need all the languages to participate in a single garbage collection regime and to have semantics for interoperability at the object level between all of them, which is a very difficult problem.

Even getting interoperability between JS and C++—what the browsers do to implement the DOM—has been exceptionally difficult, with innumerable security vulnerabilities resulting from this.

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by inputcoffee on Monday September 12, 2016 @02:43PM (#12482479)
When I said "agreed upon format" I was thinking of something like JSON to talking to the server. I didn't think of various tabs on a browser having to interact.

You probably know more about how the browser works than I do, but I think I see what you're saying.

Suppose we implemented a browser that can allows front ends coded in RUST. In my mind, the browser just gives the RUST app its own tab, with its own memory and so forth.

I am not proposing mixing up languages for the a given front end, or for components within an application or anything. Not because I think that would be wrong, but because I haven't thought it through.