Javascript is not a compiled language - period.
A Compiled language is one that when compiled it converts language code into either machine code (to run on the metal - eg c++), or bytecode (to run in a VM - eg Java / C#), and this is done 'Ahead of Time' (AOT), and you deploy the compiled code.
An interpreted language is one where the language code is compiled to machine code or bytecode at the moment of use. the language code is deployed 'as-is' and the interpreter will do the work when the app is running.
When Javascript developers talk about compiling they are really talking about something else - usually tree-shaking and minifying etc. The output of the javascript 'compile' phase is just an optimised string of Javascript code
Passionate with code... In love with Web Design, Videogames, Books and Jazz music.Years of experience in "document composition" and a Front-End Developer wannabe (since years)
I guess the optimization he is mentioning is the minify/uglify of code to reduce the user network cost to "execute"/"run" our client-side web application. In the network point of view, they are just it, a string of chars that will be evaluated in the browser JS engine.
Although I don't actually agree in the usage of "compilation" in this minify/uglify/transpile scenario, because compilation heavily implies in optimization code changes to improve the program runtime, and the steps mentioned only optimizes the network cost/developer UX.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Javascript is not a compiled language - period.
A Compiled language is one that when compiled it converts language code into either machine code (to run on the metal - eg c++), or bytecode (to run in a VM - eg Java / C#), and this is done 'Ahead of Time' (AOT), and you deploy the compiled code.
An interpreted language is one where the language code is compiled to machine code or bytecode at the moment of use. the language code is deployed 'as-is' and the interpreter will do the work when the app is running.
When Javascript developers talk about compiling they are really talking about something else - usually tree-shaking and minifying etc. The output of the javascript 'compile' phase is just an optimised string of Javascript code
Thanks for replying mate.
What about that javascript "compile" phase? Just an optimised string?
Can you explain the optimization steps for me?
I guess the optimization he is mentioning is the minify/uglify of code to reduce the user network cost to "execute"/"run" our client-side web application. In the network point of view, they are just it, a string of chars that will be evaluated in the browser JS engine.
Although I don't actually agree in the usage of "compilation" in this minify/uglify/transpile scenario, because compilation heavily implies in optimization code changes to improve the program runtime, and the steps mentioned only optimizes the network cost/developer UX.