Scripting vs. programming: is there a difference?

September 20th, 2005

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.

To summarize:

  • Scripting languages run inside another program.
  • Scripting languages are not compiled.
  • Scripting languages are easy to use and easy to write.

but …

  • 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.

Conclusion

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

35 Responses to “Scripting vs. programming: is there a difference?”

  1. John says:

    Stefan, just a suggestion:

    “These days, the line between a scripting languages and a programming languages are blurred.”

    Should be either

    “These days, the line between a scripting language and a programming language is blurred.”

    or

    “These days, the line between scripting languages and programming languages is blurred.”

    But I think I understand where you’re coming from – your name sounds vaguely Eastern European and I know articles like ‘the’ and ‘a’ are not used there.

    My Polish wife and a Czech workmate still confuse these words after a total of 50 years in Australia.

    Regards,
    John.

  2. Hi John,

    Thanks for the help with my grammar. It was just bad writing on my part …

  3. Nlp-kid says:

    hi stefan,
    I was looking for a difference in the style of writing program & a script. You didnt mention any. I hope to see that. Thanks for this note.

  4. anchalesh kumar sharma says:

    I am very happy your discription so Thank for you.

  5. krammark23 says:

    Great description!

    Thanks for the insight.

  6. kiran says:

    nice discription. you helped a lot thanks

  7. Alex Mos says:

    Never taught about the difference… for me scripting and programming is kind of the same thing… tough I would like to say that for me scripting is more for web and programming is more for local… but these days…

  8. nicodeamuz says:

    I think it’s worth adding to this discussion the notion of Interpreted languages.
    http://en.wikipedia.org/wiki/Interpreted_language

  9. Rajappan says:

    please leave alone the rubbish statements given above. The main difference between the programming language and scripting language is that the scripting language doesnot create any binary files (executables) and no memory will be allocated. For programming languages on compilation make binaries (either executables or libraries). These binaries executes from system’s memory. scripting language is a very limited, high-level language that is
    application-specific and intended to be for simple repetition and
    sequencing of the application’s commands.

  10. I’ve used scripting languages that break your interpretation – Lingo is a scripting language that works within the Directory exe and compiles.

    You can create fairly complex applications with Lingo and Director.

    Whatever the absolute truth may be, my goal was to give beginners a basic understanding of scripting languages.

  11. Honey Nair says:

    Yes you are right Rajappan :)

    Programs are converted permanently into binary executable files (i.e., zeros and ones) before they are run. Scripts remain in their original form and are interpreted command-by-command each time they are run. Scripts were created to shorten the traditional edit-compile-link-run process. The name ‘script’ is derived from the written script of the performing arts, in which dialog is set down to be interpreted by actors and actresses–the programs. Early script languages were often called batch languages or job control languages. Scripting languages can also be compiled, but because interpreters are simpler to write than compilers, they are interpreted more often than they are compiled.

    these things are defined in
    http://en.wikipedia.org/wiki/Scripting_language

  12. Paco says:

    Great article. Thanks for writing it. It was very helpfull.

  13. edward hranglung says:

    I used to get confused many times when people mention these two terms
    as i really couldnt differentiate between the two….

    Good article.. very helpful

  14. DEVESH says:

    WOULD YOU PLEASE INCLUDE SOME EXAMPLES IN YOUR ARTICLE

  15. 11mb says:

    You’re saying that PHP is so complex that you can see it as a programming language, but I disagree.

    In my opinion PHP is a scripting language because it has a certain lifetime. You can execute a PHP script, and it can build a whole class-structure, but when the last line is executed, the class-structure is gone and out of memory.

    That is a complete other approach then JAVA or C++ for example..

    But thanks for writing your article…

  16. @11mb,

    For most practical application, that difference (that you mention) is not too relevant.

    I personally see application development moving toward dynamic scripting languages like PHP, Ruby etc.

  17. 11mb says:

    @stefan

    I agree that scripting languages are becoming more and more powerful. PHP 5.0 now has a new engine that really support object oriented programming. But for, say, game programming you really need all the advantages of programming languages like: the power, memory alloc., support for openGL etc etc. This is far beyond scripting languages can do. And I think that they will never can, because it isn’t necessary that they can imo.

    Looking forward for your opinion about this…

  18. @11mb,

    I agree with what you say: scripting languages are typically not too good for game programming … in terms of building the core engines.

    That said, I have spoken to some programmers who have worked on some big name games and they tell me that several languages can be involved in the development of a game … including some light-weight scripting to fill in the gaps.

    Another thing to consider is the rise in popularity of Web based games. Flash is now a powerful platform for that arena, and it of course uses its’ built in scripting language Actionscript.

    -

    I should point out that my perspective is that of a web application developer. Business systems, database work etc.

    I appreciate your comments.

    Stefan

  19. 11mb says:

    Ah that makes your point far more clear. I want to relativize my point though.. java is a programming language but you can argue about the suitability for games programming. Java has the the sheer luck that so much people are involved in making extensions for java (mabey thats another point prog. lang. have and scripting ones don’t?).

    interesting subject :)

  20. O'conell says:

    Hi
    Really the notes is very usefull for all to know the difference between scripting and programming.Just you can insert some code example for give differece between scripting and programming.

  21. @O’conell,

    That is really dependent on the language. There are no actual concrete global difference between scripting and programming languages when it comes to the actual code.

    Stefan

  22. BlueXBlue says:

    thx alot ..
    it really helped me after googling it :)

  23. Ken McNees says:

    Nice article. Python rocks.

  24. xXx says:

    i want to make online games… but unfortunatley i don’t know what to use..i’m looking for something that is easy, geared towards beginners, and cheap

    also are they’re any languages that i should learn before taking on something like this…

  25. Praveen says:

    The insights are very good and it helped me understand the differce between the scripts and the programming language.

    Cheers,
    Praveen

  26. If you want to create online games, your best bet is to learn Flash and Flash scripting.

    We have videos:

    http://www.killersites.com/videoTutorials/Tutorial_Flash/videoTutorial_Flash.jsp

    And for scripting (actionscript):

    http://www.killeractionscript.com/

  27. cowfish says:

    I’d say that scripting languages fall *under* programming languages. I would say that any set of vocabulary that allows the definition of an algorithm, is essentially a programming language. Logical I reckon. If you look at PHP5 (and the upcoming PHP6), the support for most modern programming constructs are there, the most obvious one being OOP. In everyway, it is a programming language.

    Then as you say, people can get academic about it …

    I’m a Java/C++/PHP programmer. Always learning new stuff though.

  28. cowfish says:

    Just to clarify my post above. By “under” I mean a scripting language is a typeOf programming language.

  29. Amit says:

    Thanks a lot for the nice article.
    It really helps

  30. Nataraj.R says:

    Thanks, For all,

    The information provided was Nice.

    It will also help for beginners.

  31. Evan Donovan says:

    Best comparison between scripting & programming languages I’ve seen. Also one of the top hits on Google for “scripting vs. programming.”

  32. karthik says:

    Good one.

    But i don’t know what to conclude.

    After reading some comments i thought that i understood. But now i am again confused.

    As per the discussion it seems that there is no specific difference between programming language and scripting language?

  33. Hi,

    Just read the very first paragraph of the article:

    “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.”

    There you go.

    Don’t get to bothered by this … it isn’t that important.

    Stefan

  34. Mitz says:

    As someone who is fairly new to this area, i would just like to thank you for the descriptions, but somthing i would like to know is, what scripting language would be considered as the back bone of all languages?

  35. “… what scripting language would be considered as the back bone of all languages?

    There is no father of all the languages in terms of basic structures. Well, I would say that most modern languages these days owe a lot to the C programming language.

Created By Stefan Mischook  |  Site Map  |  Top of page  go to top of page