in reply to scripts-programs-applications

Scripting and programming IMHO are all about attitude. In my books scripting refers to thinking through a series of steps one by one, usually in straight line code, and just walking through a process. Programming refers to thinking about what you are doing and trying to write a program that happens to accomplish the task, applying all of your knowledge of how to program well to write a good program.

I have rather strong opinions on which is generally a better attitude to take.

It is very straightforward to approach small problems by scripting a solution, and a scripting language (IMHO) is a language that tries to make it possible to go quite far that way. Therefore Perl is a scripting language. But scripting as an approach does not scale, and so you will be able to accomplish more with Perl if you try to program. (Most Perl disaster stories are scripts that got out of control.) So learn to think of it as programming even though you might be able to script up an answer that works for now.

For more thoughts on it, Simon Cozens has a nice article called, Ten Perl Myths. On of my favorite quotes there that pretty much sums this up is, ...there's no real difference between programming and scripting- it's all just telling the computer what you want it to do...I'm going to talk about Perl programs here, but you might hear some people call them Perl scripts. The people who call them `programs' on the whole write better ones. There it is. Scripting and programming are the same activity. But if you are thinking about it as scripting, you will hit a wall sooner rather than later.

For an unexpected take on this, read The Curse of the Gifted. When you script rather than program, you are falling into a version of that trap. The general pieces of advice that ESR is giving Linus Torvalds there apply (with only minor translation) to a large number of Perl scriptors as well...

  • Comment on Re (tilly) 1: scripts-programs-applications