Scripting vs. programming: is there a difference?
September 20, 2005
Preamble: This is an older post, but it is still accurate:
The short answer: These days, the line between a scripting language and a programming language is blurred. As such, in practical application, the differences are meaningless. So the answer is: no.
Some details … what a nerd might tell you: Scripting or writing scripts, is programming within a program. Traditionally you would write scripts to automate certain functionality within another program. Traditionally scripts would have very specific task like for example: reading a text file to extract all the email addresses.
Why use a scripting language?
- Easy to learn – compared to traditional programming languages.
- It takes much less code to do something with scripting than when using a traditional programming language.
Another characteristic of a scripting language, is that they are processed from scratch every time you run them. A nerd would say: ‘scripting languages are not compiled.’
What is a compiled language?
A compiled language (like Java and C,) are processed once (think of a food processor) and reduced (if you will,) to a simpler form that allows it to run faster than a script that has to be reprocessed every time. – –
MORE ABOUT PROGRAMMING LANGUAGES
With programming, you are writing software that runs independent of an exterior (or parent) program. Also, when people would say they were ‘programming’, they were usually involved in some project that produced much more functionality than a traditional script.
Things have changed
I keep saying ‘traditionally’ because the lines between scripting and programming are very blurred these days – scripting is now very powerful and is doing the work that once belonged to the realm of full blown programming – in a traditional sense.
Let’s look at some examples:
PHP: People refer to software written in PHP as ‘scripts’ because PHP runs inside another program – the PHP script engine. But unlike traditional simple scripts, PHP software can be very complex and very powerful. Java: Most people would refer to Java as a full-blown programming language because it’s compiled. But, Java (like PHP) runs inside another program, something called the Java Virtual Machine. So here we see the first of those blurry lines I mentioned above.
- Scripting languages run inside another program.
- Scripting languages are not compiled.
- Scripting languages are easy to use and easy to write.
- Very popular programming languages (Java, C#) run inside a ‘parent’ program – like scripting languages.
- Scripting languages today are used to build complex software.
- Computers are so fast these days, and scripting languages are so efficient, that for most business operations, there is no practical speed advantage (that there once was,) with a compiled programming language.
Today the difference between scripting and programming is largely an academic thing. You shouldn’t have to concern yourself with what broad category a particular language may fall in.
You should only be concerned about the language itself and how well suited it is for the job at hand – each language has its strengths and weaknesses. – – Stefan Mischook
PS: I just released (in 2016) the best web developer training package I’ve ever created: Interactive Web Developer.