Deutsch English Français Italiano |
<scripting-20240330084331@ram.dialup.fu-berlin.de> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail From: ram@zedat.fu-berlin.de (Stefan Ram) Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Command Languages Versus Programming Languages Date: 30 Mar 2024 07:47:14 GMT Organization: Stefan Ram Lines: 59 Expires: 1 Feb 2025 11:59:58 GMT Message-ID: <scripting-20240330084331@ram.dialup.fu-berlin.de> References: <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org> <programming-20240329210532@ram.dialup.fu-berlin.de> <877chkindf.fsf@tudado.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de HAhnKYvLCTB6r+10pPf7xgckX9mIMa85yCOgrce+yMT04u Cancel-Lock: sha1:uNMxRvLU6Nbb3C9CPYC3+YT59wY= sha256:NGNdqCHZFbKW3S5nr5Yl1rl+1hh0nOzyiUb/7AuSsCc= X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved. Distribution through any means other than regular usenet channels is forbidden. It is forbidden to publish this article in the Web, to change URIs of this article into links, and to transfer the body without this notice, but quotations of parts in other Usenet posts are allowed. X-No-Archive: Yes Archive: no X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some services to mirror the article in the web. But the article may be kept on a Usenet archive server with only NNTP access. X-No-Html: yes Content-Language: en-US Accept-Language: de-DE-1901, en-US, it, fr-FR Bytes: 4239 Johanne Fairchild <jfairchild@tudado.org> wrote or quoted: >ram@zedat.fu-berlin.de (Stefan Ram) writes: >>Johanne Fairchild <jfairchild@tudado.org> wrote or quoted: >>>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. >>C is clearly a programming language, yet its specification >>says, "The semantic descriptions in this document describe >>the behavior of an abstract machine". And you cannot buy >> this abstract C machine as a piece of hardware anywhere! >Of course. :) But we both know what that means. It's abstract because >there are so many real machines for which this abstract one is an >abstraction of. And the real ones are the target of the language. If you want to see it this way ... But look at Pascal, Java, or Python. They are usually compiled into an intermediate code (called "p-code" in the case of Pascal) which is then interpreted (the interpreter is called "JVM" in the case of Java). Yet, we think of Pascal and Java as programming languages and of Python as a scripting language. But this is actually an implementation detail: Java also can be compiled into machine code. In any case, we can write a small batch file "execute" which can be called for source code in any programming language and will execute it: execute Main.pas execute Main.java execute Main.py execute main.c execute main.cpp execute main.bas execute main.bat .... They all will print "Hello World". Whether the execution happens via translation to machine code or via interpretation by another program or by a mixture of both is just an implementation detail of "execute", that usually will not matter much for the programmer. And often for the same language, one is free to either compile it to machine language or interpret it via another program. Some language, like LISP or Python, have "eval": These languages still can be compiled, but they require an interpreter at run- time. Java often is executed by interpretation first, but when the "Hotspot" interpreter sees that some code is executed often, it will then decide /at run-time/ to compile it into actual machine code! (And there are Python implementations that run on the JVM.) How can such implementation details matter for the question whether a language is called a programming language or a scripting language, when the programmer often does not even need to know about them? Yes, there also are C interpreters IIRC, but they are rare.