Deutsch English Français Italiano |
<uu7ahh$ghfn$5@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Command Languages Versus Programming Languages Date: Fri, 29 Mar 2024 21:06:58 -0000 (UTC) Organization: A noiseless patient Spider Lines: 35 Message-ID: <uu7ahh$ghfn$5@dont-email.me> References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 29 Mar 2024 21:06:58 +0100 (CET) Injection-Info: dont-email.me; posting-host="521a9234fa531f5fbb354bce794424cb"; logging-data="542199"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6+uDEQkpNcPafGJrmQuUs" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:n3iy9Q1aQEXy7qYWyxla00tOjKs= Bytes: 2827 On Fri, 29 Mar 2024 08:09:46 -0300, Johanne Fairchild wrote: > Consider looking at a shell language like a domain-specific programming > language. A shell is a programming language made specifically for > running programs. ... (Of course, the idea evolves and you want to > glue programs, do variable substitution et cetera.) That’s the thing. The design for a “language made specifically for running programs” always seems to start with the assumption that what the user types is to be passed as literal text, unless special markers are present to indicate that they want to “glue programs, do variable substitution et cetera”. Notice your use of the term “variable substitution”, which is characteristic of a shell language: in a programming language, you don’t call it “substitution”, you call it “evaluation”. > A scripting language is a programming language made for a hypothetical > machine, not too different from a programming language made for a real > machine, one made of hardware. In our CS classes we learned to think about “abstract machines”, and forget the distinction between “software” and “hardware”. Instead, we build layers of abstract machines, one on top of the other, getting more and more specialized towards the particular class of problems we want to solve at any particular time. Command languages are just another such “abstract machine”, and the scripts we write in them are another layer on top. The layering only stops when you get to a GUI; they can’t be used to build any further “machines” on top. > You seem to find trouble with using a programming language in a REPL. I find REPLs annoying and inconvenient. If I want to do “scratchpad” programming, I do it in a Jupyter notebook.