8 ms·
"No, blue is definitely the better color for nuclear power station bike sheds". It's all programs. Yes, even that one-liner. Viewed from the right (or wrong)
by dusted 3y ago
"No, blue is definitely the better color for nuclear power station bike sheds".
It's all programs. Yes, even that one-liner.
Viewed from the right (or wrong) level of abstraction, everything that can be called a program, can be called a script, and vise-versa.
But the most important thing about this discussion, is that it's utterly unimportant. Like, what kind of decisions are made based on whether something is a script or a program?
- CharlieDigital 3y agoAgree. "Script" is more accurately a descriptor of the language and runtime. Typically meaning it is interpreted at runtime versus complied at build time. Every script is a program.
- irrational 3y agoSo, we need to rename JavaScript to JavaProgram since it is compiled instead of interpreted these days.
- wartijn_ 3y agoIf we're going to rename JavaScript, I suggest we focus on the Java part of the name :D
- jnwatson 3y agoEven better, Python scripts become programs after they are run for the first time.
- Dork1234 3y agoThat assume it is running in CPython.
- Tade0 3y agoThat's just what Kyle Simpson says. In any case it's not a meaningful distinction.
- CharlieDigital 3y agoJavaScript is interpreted and then compiled and optimized. If you're writing TypeScript, that's just converting it into JavaScript. At the end of the day, a JavaScript program is delivered as text to be interpreted at runtime. A .NET C# .exe or .dll is not. Therefore, one is a script, the other is not.
- dr-detroit 3y ago[dead]
- croes 3y agoA script is code, without runtime it's just text This is a script: print("This line will be printed.") Without runtime, it does nothing.
- fragmede 3y agoWithout libc, most compiled programs will struggle to run as well. That "print" is a human readable command in Python is besides the point.
- lizard 3y agoI think of scripts as a sub-type of program; it is more appropriate to contrast it to a library, such that the intent changes a few expectations about how the program is built and maintained. A script is specifically a program intended to perform a user process. Scripts may be maintained by the "user" who has knowledge of the process, rather than the domain or software engineering. Things like style guides don't matter for a script if just needs to gets the job done. They may be messy and easier to replace than refactor if the process or environment change. In Python I also make the distinction that a script (can) use hyphens in the name, which can be executed, e.g. `python do-thing.py`, but can't be imported through a typical `import` statement (because they generally shouldn't be). As you say, this isn't really _important_. Scripts _can be_ well written and follow engineering principles. I just use this distinction to recognize the need for these "fast and loose" programs, where there's more emphasis on making a thing happen than maintaining the code. By saying, "This is a script," I'm really saying, "I don't expect to put a lot of energy into it."
- Fire-Dragon-DoL 3y agoDoes this classification give any value? I couldn't answer yes for any point, so considering them the same it's simpler.
- lizard 3y agoDoes being able to say I have a labrador. instead of, I have a dog. give any value? It depends what you are doing and who you are working with, I suppose.
- croes 3y agoIt's easier to change a script than a program. It's easier to understand a script than a program (of the same complexity)
- tenebrisalietum 3y ago> what kind of decisions are made based on whether something is a script or a program? Executables (binaries) run directly. Some code requires an interpreter to run. Really important to the OS and those who want to run the application, as you need the right interpreter for the second case.