Sujet : Re: Command Languages Versus Programming Languages
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 30. Mar 2024, 00:51:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uu7k56$ipoh$2@dont-email.me>
References : 1 2 3 4
User-Agent : Pan/0.155 (Kherson; fc5a80b8)
On Sat, 30 Mar 2024 00:14:42 +0100, Janis Papanagnou wrote:
What I was saying is that there's initially literal program text
that is transformed to tokens in the lexical analysis, and then
further processed.
In a shell language, that is “further processed” as literal text, except
for any instances of substitution markers.
in a programming language, you have the assumption that
“everything is a program construct until indicated otherwise”.
So what is 'for i in a ; do ... ; done' then in your world?
“for” is just the name of a command, like any other. In POSIX, this one
happens to be built into the shell; it might not in other shells.