in reply to Re: Script or program?
in thread Script or program?
The difference between a script and a program is one is a subset of another. A program is typically a piece of text that contains instructions. A script is a program that is interpreted in real time and then turns it into a lower level language. Of course, that leaves java, which isn't a script language, in a fuzzy definition.
I agree that one is a subset of the other, but differ in your idea of what constitutes a script. To me, a program (in the computer programming sense) is a sequence of instructions for a computer to execute. These instructions can be in any form, assembly, C, Perl, byte code, whatever. A script is exactly the same thing but bent towards the human side of readability rather the computer side of readability. Scripts are most often higher-level languages because of this and I think the idea that "scripts are interpretted in real time" falls out of this merely as a matter of consequence. The higher-level the language the greater it's scriptiness
If I created a C interpretter would the C programs I write for it suddenly be scripts? I don't think so. By your definition they would be. Scriptness is innate in the language, not the implementation. So, Java programs are also Java scripts in this sense. But that's just my opinion
I think the whole idea of "script" vs "program" is sort of meaningless these days though. In the old days it meant interpretted vs. compiled, but that dichotomy has gotten fuzzier with time.
|
|---|