DEV Community

Discussion on: Is Javascript a compiled language?

Collapse
 
genta profile image
Fabio Russo

I forgot the fact that every block is compiled when called... as you said for the function.

I know that the idea of “compiling” is not fitting totally to It... but It’s there in many ways.

Collapse
 
bgadrian profile image
Adrian B.G. • Edited

Anyway, from what I know, all of these are just implementation details. I think ECMAScript doesn't specify if it should be interpreted, compiled or when each block should be compiled.

Bottom line, I agree that all devs should know more about how the compiler works, a lot of bad code is written under the "it is more optimal this way" umbrella, not knowing that the compiler will do that for him anyway, and they could have kept the code more human friendly.

Thread Thread
 
genta profile image
Fabio Russo

Agree.

JS is pretty easy at a first sight, but if you want to use It not just as the “browser languagae” you need to know grammar, lexing, values, coercion...
Non that It’s needed to know the specifications completely (they’re always online for you) but at least, one time, you should read It and have an idea on how It works.