"What do you do for a living?"
"Right now, I'm a programmer."
"Really? What languages?"
"Well, right now nearly all of our stuff is in Perl 5."
"Oh, so you're a Perl scripter?"
"No, I'm a Perl Programmer."
"No, you're a Perl Scripter. Perl is not coding -- it's an interpreted language!"

Okay. I can be calm about this.

The argument that gets posed to me is then "what defines a programing language or a scripting language". This is a very thin line.

The Main argument against Perl, Ruby, Python and other 'interpreted' languages is that they are, in fact, interpreted at run-time. Therefor they are scripts, not programs. You are a scripter, not a coder.

Oh really?

It seems to me that the only difference between C and Perl source really when that source is compiled. With C, you compile the code and it sits in Machine Language form from then on. In the Perl world, the source is not compiled until runtime -- slower, certainly, but very similar. And yet, people still seem to say that Perl it's a really language because it's interpreted.

Then, by that argument, I could also say that C is not a real language because I have seen C interpreters as well, and there exists at least two Native Perl Compilers that I know of.

What qualifies as interpreting, anyway? To the people I have talked to, interpreted code is to them anything that doesn't exist in the machine code of the machine it's running on. By that logic does that mean that Java is interpreted? It's compiled, sure, but the JVM still does interpretation of the bytecode.

So, what's all this leaving up to?

For me, the difference between 'Script' and 'Program Code' is the use of logic. HTML is not coding because it's just text with tags -- you can't Loop, do maths or the like ( unless you add something like PHP ). C, Lisp, Perl and CSH are coded because they can use logic. A script is just that, a script -- like a play, it's a set of events that are done in a particular order as laid down by the playwright.

Perhaps it goes even deeper than that -- perhaps Coding is simply a state of mind? Depending on how much intelligence I put into my Perl, I could come out as a piddling script or as a huge monstrous program?

No matter how widespread this term is there is not currently a single accepted definition for a scripting language or scripting, it is rather determined by example and convention.

In practice, people tend to view languages like Perl and Python as “scripting languages”, largely because they see that you "run the source" (i.e., pass the file to an interpreter).

This is unfortunate.

I rather prefer Larry Wall's (author of Perl) definition of a "script": something that you write to accomplish a quick job at hand, as opposed to a "program": something you write with the intention of putting it into some sort of production. It's a little difficult for most people to get their hands around this definition, though, because it means that you can have things like C scripts and shell programs.

Based on this “script” vs. “program” distinction, a scripting language is one in which people usually write (or think they write) scripts, and a programming language is one in which they write programs. You can come up with rules of thumb, e.g. scripting languages tend to be interpreted but it is easy to find exceptions to any of them.

In short, I think that the "whether it's a script or program depends on what you do with it" approach is correct.


If you decide it's not that you like this node very much and want to do the reverse of upvote this node, please /msg me with an explanation.

Log in or registerto write something here or to contact authors.