3 ms·
JavaScript was designed in 10 days in 1995 to get something out ASAP. It was simple and hacky and it spread like a virus in the following 23 years, covering alm
by etatoby 9y ago
JavaScript was designed in 10 days in 1995 to get something out ASAP. It was simple and hacky and it spread like a virus in the following 23 years, covering almost every niche of programming.
It is only now getting such (basic) language features as variables and constants being lexically scoped by default, a generic flow control primitive (async/await + exceptions which is almost, but not quite, as powerful as call/cc), as well as useful features such as multiline/template strings, proper classes, symbols, a shorter lambda syntax, and dedicated hashmap/set containers.
JavaScript is the quintessential example of why Worse is Better.
PS: even though CSS was first proposed in 1994, the availability of JavaScript and document.write() in browsers, as well as its use on the web predate the adoption of CSS by several years.