JavaScript the Fun Part


the-world-of-javascript

javascript-in-reality


While usually in other programming languages we first has specification and then based on that standardization and later implementation; it is not completely true for JavaScript.

before ES6

Even at the beginning to compete with Microsoft, Netscape wanted to have a scripting language as soon as possible. So the main / core idea, the goal was not to have a well designed programming language but rather reaching the market of dynamic web browser.

This start leads us to the second odd thing about javascript which is standardization is usually behind implementation!

Which means web browsers because of the market and businesses needs implement a feature and it works whereas this feature has not been standardized by others yet!

For example XHR (= XML HTTP Request), which we had it in 1999-2000 working in some browsers before it becomes standard.

The second version of the MSXML library was shipped with Internet Explorer 5.0 in March 1999, allowing access, via ActiveX, to the IXMLHTTPRequest interface using the XMLHTTP wrapper of the MSXML library.[6]

and

The World Wide Web Consortium published a Working Draft specification for the XMLHttpRequest object on April 5, 2006, edited by Anne van Kesteren of Opera Software and Dean Jackson of W3C.[16]

So browsers in 2000 have XHR but it becomes standard in 2006.

after ES6

But the game changed by releasing ES6 which finally added most of the features that JavaScript needed for years like declaring block scope variable.

Remember we have C programming language in 1972? It has block scope variable, but JavaScript did not have till 2015!

So the coin flipped and now implementation is behind standardization! That is why we have babel and webpack; to convert new ES6 (= 2015) standard to ES5 (= 2009) that all browser can handle it correctly.

market! web browsers! standardization!

Lacking consistency between thesee three pieces, most of the time causes headache for developers who are dealing with JavaScript.

Can we get rid of this nature in JavaScript? Maybe, who knows for sure?

Lets have a look at ECMAScript which is the standardization version of JavaScript.

Next javascript-ecmascript


Update: Thu Aug 15 2019 09:06:23 GMT+0430 (Iran Daylight Time)