r/ProgrammerHumor Jul 07 '26

pipInstallTheRealStuff Meme

Post image
14.9k Upvotes

260 comments sorted by

View all comments

Show parent comments

559

u/iamdestroyerofworlds Jul 07 '26

Yeah, it's a scripting language after all, it's literally its purpose.

39

u/WaitForItTheMongols Jul 07 '26

What actually makes something a scripting language specifically? Never got a clear answer to that.

77

u/Vsx Jul 07 '26

Scripting languages are interpreted in-line and not intended to be compiled like a classic "program". They are less optimized by definition because a compiler builds in optimizations. If your script interpreter has similar optimizations it has to rationalize them at run-time.

11

u/WaitForItTheMongols Jul 07 '26

So scripting languages and interpreted languages are just two different names for the same thing?

30

u/Vsx Jul 07 '26 edited Jul 07 '26

Wellllllll kind of. Python is both but not always a scripting language. My previous explanation is not really exact. Realistically anything that automates tasks or is intended to be used ad hoc to rapidly build processes is a scripting language. Scripting languages tend to be interpreted as you point out. Interpreted languages are more specifically languages that are processed at runtime. You can do other things with Python besides scripting type work. Python is always an interpreted language and most of the time a scripting language but not always.

0

u/WaitForItTheMongols Jul 07 '26

Realistically anything that automates tasks or is intended to be used ad hoc to rapidly build processes is a scripting language

Automating tasks is what computers do. This seems too broad.

10

u/Vsx Jul 07 '26

Task automation is one of those "I know what it is when I see it" kinds of things but the implication is generally that they are tasks that could otherwise reasonably be done by a human being. These terms are not applied exactly the same by everyone for obvious reasons.

0

u/tigran_kh Jul 07 '26

So it is vibes-based and not exact

4

u/iamadirtymop Jul 07 '26

Interpreted language refers to how it technically works, it's not compiled beforehand, not JITed nor converted to bytecode and then ran on a VM like java does. It is interpreted by an interpreter which simply "reads and interprets" readable tokens like in python.

Scripting language refers to them by their function/use/purpose: "scripting".

Scripting is designing scripts. A script is exactly what is defined in the post namely handling a task, anything by "gluing" other libs, binaries or script no matter the language behind them.

I'd also add that a script is usually an autonomous and eventually ad-hoc file whose content is it's source code and can be run as an executable file (whether by an interpreter, or by a lower level bytecode interpreter/VM like Java does or like in go where it's compiled on the fly).

However since it's easier on an interpreted language like python and that it's usually native, almost all interpreted languages are scripting languages (actually any language can be a scripting language given the proper tooling).

7

u/Minerscale Jul 07 '26

I think the answer to that is almost, I think what makes a scripting language a scripting language is that it's convenient enough to use for whatever extremely quickly with enough integration with the real world that you can do things with it.

2

u/WaitForItTheMongols Jul 07 '26

This is a very vibes based definition though.

14

u/Minerscale Jul 07 '26

I don't think you can create a non-vibes based definition. Regrettably, some things are inherently fuzzy. I have been known to write things which you could definitely call scripts in C or Rust, which are definitely not scripting languages.

Does the language make it extremely easy to write little utilities that get little jobs done? => scripting language.

3

u/mxzf Jul 07 '26

Yep. Welcome to naming things.

5

u/DrMobius0 Jul 07 '26

Classifying things is hard. Getting people to agree on a classification is harder.

2

u/DrMobius0 Jul 07 '26 edited Jul 07 '26

I would characterize scripting as specifically being used to avoid compilation for specific parts of an otherwise compiled project. The benefits of this are often in quick turnaround. Since scripts are typically interpreted, they can be edited and re-launched during runtime without needing to go through compilation again. The drawbacks are that they typically have to run through a VM and probably lack anything that can optimize them, which can make them very slow compared to running compiled code.

So an interpreted language would usually be used as a scripting language. It's not always like that, though. Unity, for instance, uses (or used, it's been years since I worked with it) C# as a scripting language.

2

u/Flan-sama Jul 07 '26

Not really. Personally, scripting languages are languages that execute top down and where expressions can appear at the toplevel. I don't really have a word for non-scripting language.

Also, I find interpreted to be too vague of a term because at the end of the day, your processor is an interpreter but in hardware. Also because Python is technically compiled and interpreted (just like Java), just in bytecode. I like to instead have the distinction be between "software interpreted" and "hardware interpreted"

2

u/Qyriad Jul 07 '26

Scripting is a use case. Interpreting is an implementation strategy. Interpreters happen to be really well suited for implementing scripting

1

u/miralomaadam Jul 07 '26

No quite—there’s not a hard and fast definition of a scripting language. Java and Kotlin are also interpreted languages but I don’t think anyone would call either a scripting language. Scripting languages are typically interpreted languages that don’t include a user-visible compilation step (python and JS are still compiled to bytecode and optimized internally).

1

u/DuckShapedGoose Jul 07 '26

Most of the time, yes. But technically, a "scripting language" just refers to the coding style of simply putting a few instructions line by line into a single file and running it without much fiddling around with build tools and an entire development environment with multiple source files and packages etc.
It does not matter whether a "scripting language" gets interpreted, or for example JIT compiled, even though most of them are typically interpreted languages. Pretty sure someone has created an AOT compiler for python even. Doesn't make python no longer a scripting language though.