Steven D'Aprano
1/25/2008 12:58:00 AM
On Thu, 24 Jan 2008 12:22:04 +0000, samwyse wrote:
>> The term "script" has the strong connotation of a limited-purpose
>> program designed to solve a problem expressed almost entirely as a
>> simple series of steps. Languages that are often used to write such
>> scripts are usually referred to as "scripting languages", which becomes
>> a denigration because such a language need not have support for much
>> else.
>
> I strongly disagree with your interpretation. Scritping languages
> provide high-level facilites for process control. Historically, they
> were purely interpretive but now they tend to compile to some sort of
> byte code. Examples include the various shells, Rexx, and various
> languages whose names start with "P".
Do you have a source for your claim that the shells (e.g. Linux/Unix
shells bash, ksh, zsh, etc. or Windows shells cmd.exe, command.com) are
compiled to byte code? I don't believe this is the case, I understand
that they are typically "immediate interpreted" languages, that is, each
line in interpreted from source code immediately before being executed,
as often as it takes.
Note to purists: yes, I know that being interpreted or compiled is a
property of the implementation, not the language. But when all the
implementations of a language (where "all" might mean "the only one"), I
think it is reasonable to blur the lines.
> Languages which only express a
> "series of steps" are generally called batch languages.
Maybe in the Windows/DOS world, but not typically in the Linux/Unix
world, where they are called scripting languages.
> I've never
> heard anyone refer to a .BAT file as a script.
Linux/Unix/Mac admins may be excused for saying that they've never come
across a .BAT file at all.
$ locate .bat | wc -l
14
Oh well, what do you know! I've got fourteen of the beggars. Hmmm... two
are in the Python standard lib, two are in wxPython, six seem to be in
the game Abuse, a couple of false positives, and a few odd files.
$ locate .sh | wc -l
606
--
Steven