Skip to main content
Topic: Scripts and programs (Read 1031 times) previous topic - next topic

Scripts and programs

Quite often, the terms script and scripting are used as synonyms for program and programming, respectively.
The inventor of the Perl programming language, Larry Wall, tried to explain the difference between script and program in a humorous way.
Quote
Suppose you went back to Ada Lovelace and asked her the difference between a script and a program.
She’d probably look at you funny, then say something like: «Well, a script is what you give the actors, but a program is what you give the audience».
That Ada was one sharp lady…
Since her time, we seem to have gotten a bit more confused about what we mean when we say scripting.
It confuses even me, and I’m supposed to be one of the experts.
:D

Re: Scripts and programs

Reply #1
Love the Ada Lovelace example.

Please correct me if I'm wrong (likely) but the way I now understand it is that a program ends up being compiled, whereas a script has come to mean any language that requires an interpreter to be running, and halfway between that are the semi-compiled languages though the compiling step would make me consider them programming languages rather than scripting languages.

Thus: C, Pascal etc. are programming languages - they need to be compiled before they will do anything.
VBScript, Javascript, php etc. are scripting languages - they use an interpreter to parse a text file in real time.
Then there's the semi-compiled languages that are compiled into an intermediate format (e.g. Bytecode) but still require a runtime component to interpret the semi-compiled "program".  I believe .NET, java and python are current examples of this approach.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

 

Re: Scripts and programs

Reply #2
Yes, Lawrie, as far as I know you're correct.
Just a detail: the original pascal was a semi-compiled language. The compiler used to generate the so-called "P-code", later interpreted during runtime.
Then arrived Borland Turbo Pascal...  ;)
Look here.