[Tutor] what is the difference between a scripting and object
oriented programming language?
Mon Jun 2 19:09:01 2003
Thomas CLive Richards wrote:
>A scripted language is one where there is an interpreter which reads the
>source code file, and compiles it "on the fly". that is, it compiles
>your source code file (pretty much) line by line, and executes it as it
>goes. This means that there is no compilation process (that you, the
>user can see anyway).
Actually, to be pedantic, what you're describing is not a scripting
language, but an interpreted language. Compiled languages have a
program (the compiler) that converts source code to a directly
executable form. Interpreted languages have a run-time program (the
interpreter) that reads in the source code and executes it "on the fly",
inside of the interpreter.
Many (most?) scripting languages are interpreted, and few compiled
languages are considered to be scripting languages, but the question of
compiled vs. interpreted is only loosely connected to the question of
"scripting" vs. "serious" languages.
A lot of the problem here is that "scripting" is a pretty vague
designation -- it means a language that's convenient for writing scripts
in, as opposed to writing "full-blown programs" (or applications). But
how does one distinguish a complex script from a simple application?
That's an essentially unanswerable question. Generally, a script is a
series of commands applied to some set of data, possibly in a
user-defined order... but then, one could stretch that description to
apply to Photoshop, which is clearly a major application. Scripts are
generally smaller than applications, do some well-defined thing and are
"simpler" to use, and typically can be decomposed into a clear series of
sub-operations, but all of these things are subjective.