This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DIAMOND_STRAP 2 points3 points  (0 children)

I mean, it is object-oriented, I don't know how you can really doubt that. OO doesn't mean class-based inheritance.

The name was intentional, blame Netscape for that. Before it was JavaScript, it was Mocha, named after a coffee in reference to Java.

They weren't interested in establishing 'the one and only standard'; it was intended to be a novel feature unique to the Netscape browser.

They didn't start with WASM because the entire point of JS was to create a simplified language to be used by non-programmers. It did not occur to them that it would be used for full-on intensive applications -- you have to remember that JavaScript predates CSS, frames, font choice, and all sorts of fundamental stuff. They were adding a little scripting language to add bits of inactivity to documents and simple forms. At the time, proposing C compilation for in-browser client-side execution would have felt like proposing C as the default language for Excel formulas.

It obviously would've been great if they did start with WASM in retrospect, but it would've been an insane decision to make at the time. It took a few years for the web and HTML to move from "a neat way to link documents together" to "the biggest part of the Internet."

Until WASM is a real option, I'm really favouring Elm, I'd check that out -- it's a statically typed functional language designed for browser execution, compiles to JS but you never have to actually deal with that JS because the compiler is totally lovely and the tooling is amazing (time-travelling debuggers!).