0

Since V8 compiles JavaScript into assembler, may we say that in the Chrome environment JavaScript is not anymore a script language but a programming language instead?

V8 compiles JavaScript source code directly into machine code when it is first executed. There are no intermediate byte codes, no interpreter.

https://developers.google.com/v8/design#mach_code


The very same question has been (better) debated here 10 months ago:

Can Javascript be considered a interpreted language when using Google Chrome (V8)?

Community
  • 1
  • 1
donkeydown
  • 698
  • 7
  • 16
  • 3
    What's the difference? I would say that it's always been a programming language. – duffymo May 23 '13 at 09:30
  • Then, how may we technically distinguish V8's behaviour from other engines? – donkeydown May 23 '13 at 09:36
  • 1
    @donkeydown: The only difference in behaviour that you see is performace. The compiling Javascript engines are built to work exactly as the previous interpreting engines in all other aspects. – Guffa May 23 '13 at 09:40
  • @donkeydown: If you dictate a letter to your personal butler who then listens to the sounds coming out of your mouth and converts them into writing, the final language is essentially indistinguishable from that which results if you'd simply gotten off your arse and written the letter yourself. The content is the same, the language is the same, and the topic of the letter is the same. – Lightness Races in Orbit May 23 '13 at 09:45

3 Answers3

4

"Scripting languages" are an (ill-defined) subset of "Programming languages", so its always been appropriate to refer to JavaScript as a programming language.

But basically, scripting is not a technical term. When we call something a scripting language, we're primarily making a linguistic and cultural judgment, not a technical judgment.

Programming is Hard, Let's Go Scripting...

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
3

A script language is also a programming langauge.

Anyhow, the characteristics of the Javascript language hasn't changed even if the underlying implementation of the executing engine has changed. Javascript still has features that are very characteristic to what we see as a script language, like dynamic data types and dynamic code generation.

Javascript was originally a plain interpreted scripting language, but how the code is executed has changed a lot over the last few years. However, apart from how this affects performance, the language still works exactly as it has always done.

Guffa
  • 687,336
  • 108
  • 737
  • 1,005
1

Program (Turing machine) is just a mathematical structure, a piece of information. You could create programming languages and write programs hudreds of years ago, without having any computer to run it.

Programming language is defined by it's specification, not by "things" that you do with it (compilation, interpretation etc.). You don't have to have a computer to write programs. If you know the specification, you can "run" your program on your input in your head or on paper and get an output.

Actually, first programs were written far before first electronic computer was invented.

Ivan Kuckir
  • 2,327
  • 3
  • 27
  • 46