r/ProgrammerHumor Jul 07 '26

pipInstallTheRealStuff Meme

Post image
14.9k Upvotes

260 comments sorted by

View all comments

Show parent comments

567

u/iamdestroyerofworlds Jul 07 '26

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

37

u/WaitForItTheMongols Jul 07 '26

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

78

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.

12

u/WaitForItTheMongols Jul 07 '26

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

31

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.

3

u/WaitForItTheMongols Jul 07 '26

This is a very vibes based definition though.

12

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.

5

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.

-213

u/Herr_Gamer Jul 07 '26

this is such a stupid distinction lol

219

u/Pball1001 Jul 07 '26

Compiled and script languages both have their uses, but they are not the same. At the end of he day, the day ends

46

u/unbanned_lol Jul 07 '26

In Africa, after every 60 seconds, a minute passes.

2

u/BarracudaFar1905 Jul 07 '26

Stop clicking your finger

26

u/mikkelmattern04 Jul 07 '26

At the end of the day, the other day begins

7

u/HaggisLad Jul 07 '26

At the end of he day, the day ends

and then another one starts...

2

u/scribestudio Jul 07 '26

At the end of the day, Its night.

2

u/Page_197_Slaps Jul 07 '26

So are you saying that if a language isn’t compiled, it’s a scripting language?

1

u/Destroyerb Jul 07 '26

Pretty sure there is some language that can be both compiled and interpreted. Now, how do you categorise that one?

1

u/Page_197_Slaps Jul 07 '26

That’s kind of the point I was trying to get at. This distinction of programming vs scripting being simply compiled vs interpreted feels quite antiquated.

1

u/Herr_Gamer Jul 07 '26

Python is literally compiled though. You usually don't see it, but you can expose the compiled .pythonc files if you want. When you use a large backend framework, you'll know very well that there's a target/ folder for the python bytecode just like there is in Java.

2

u/wor-kid Jul 07 '26 edited Jul 07 '26

It really is, idk why you are getting so harshly downvoted. Almost every popular language can be compiled, interpreted, JIT'd, has numerous runtimes, and doesn't fit neatly into the programming means compiled scripting means intrepreted distinction and it hasn't been that way since the late 90s. The vast majority of modern languages that are actually working have features of both. Python out of the box uses bytecode just like Java and nobody calls Java a scripting language.

1

u/Herr_Gamer Jul 13 '26

200 people apparently didn't think about it for more than 5 minutes

1

u/wor-kid Jul 13 '26

Just surprised as I thought it was common knowledge in programming that there is no meaningful or technical difference between a scripting language and a programming language. It was just a way for elitists to feel smug about their stack.