Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (0 / 6) |
Uptime: | 108:30:13 |
Calls: | 290 |
Files: | 905 |
Messages: | 76,683 |
At one time, we distinguished between “scripting” languages and “programming” languages. [...]
But there is one distinction that I think is still relevant, and that
is the one between shell/command languages and programming languages.
In a shell language, everything you type is assumed to be a literal
string, unless you use special substitution sequences.
[...]
This difference in design has to do with their typical usage: most of
the use of a shell/command language is in typing a single command at a
time, for immediate execution. Whereas a programming language is
typically used to construct sequences consisting of multiple lines of
code before they are executed.
[...]
Conversely, using shell/command languages as programming languages, by collecting multiple lines of code into shell scripts, does work, but
only up to a point.
The concept of variable substitution via string
substitution tends to lead to trouble when trying to do more advanced
data manipulations.
So, in short, while there is some overlap in their applicable usage
areas, they are still very much oriented to different application
scenarios.
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
At one time, we distinguished between “scripting” languages and
“programming” languages. [...] But there is one distinction that I
think is still relevant, and that is the one between shell/command
languages and programming languages.
[...]
Consider looking at a shell language like a domain-specific programming language. A shell is a programming language made specifically for
running programs. When you write a shell line, you're specifying the arguments of execve(2). In other words, a shell is a programming
language made to prepare the memory to be consumed by the system in a specific way---execve(2). (Of course, the idea evolves and you want to
glue programs, do variable substitution et cetera.)
During parsing (either in
an interpreted or in a compiled language) you split the text
in tokens.
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote or quoted:
During parsing (either in
an interpreted or in a compiled language) you split the text
in tokens.
Splitting into tokens is called "scanning". Parsing usually
follows scanning and unifies the grammar with the text.
... even shell interpreters don't
just interpret "literal strings"; it's no criterion for "scripting" and appears to be just artificially and unnecessary.