What's the difference between programming and scripting?

What's the difference between programming and scripting?

When writing a script you are also programming, but when programming you are not necessarily writing a script.
Scripting could therefore be considered a subset of programming.
Scripts are raw text executable files, whereas programs are usually binaries compiled from source code.

so a non-script program is one that has dependencies etc?

why do people call Python a scripting language rather than a programming language?

>so a non-script program is one that has dependencies etc?
It has nothing to do with dependencies. A script is raw text, whereas a program is a binary executable. You can look into a script, but cannot look into a program. If you did look into a program you would only see gibberish, ie human language compiled into machine language.

>why do people call Python a scripting language rather than a programming language?
Becuse python is an interpreted language. You use human language and it interprets it into machine language on the fly. It does this without compiling it into a program (like a .exe file in windows, or a binary file).

so a program is a binary and a script is text is the only difference?

with scripting you can also automate existing programs and chain them together, like with pipes in bash

The rule of thumb is, users might call something a "script" if they wrote it themselves without knowing how to program. So, if you write code to extend an existing compiled program to help you perform some task, or if you write a program to chain together several other programs on the command line, you might call those "scripts." There's no absolute definition, though. Those are still programs, and you're still programming.

scripts have dependencies

scripts are interpreted, programs need to be compiled first. that's the only difference. (although scripts can b compiled too, like python. that allows them to run faster).

whether you're writing a script or a program, both case you're "coding" or "programming".

Also scripts are often learned as a first language because they're easier to debug, you cans usually execute your program directly in a shell (like bash for example), and the shell directly returns errors. It's perfect for trial and errors when you're learning.

For more advanced coders, scripts are useful to quickly create simple programs (that you may just run once) to automate repetitive tasks.

>scripts are interpreted, programs need to be compiled first. that's the only difference.
This is still bullshit because having to compile a program manually is an implementation detail, not an inherent difference between two paradigms. Any interpreter for a "scripting" language can in principle compile all its input automatically before running it.

so what's the real difference?

from the user's point of view it makes a big difference though.
many people even call python a "programming" language, but the whole point is it can be executed directly from the shell.

the real difference is you CANNOT execute a program without compiling it. but you CAN execute a script directly from its shell.

No entirely true. How do you think the first compilers where made?

java is a scripting language

well we're talking about high level programming, obviously you can program in assembler if you're autistic enough

I can program in assembly language and I'm not autistic. Argument DESTROYED.

>animay
>lolol.jpg
> I'm not autistic

...

There is no "real" difference. "Script" is another name for "program" and it's up to the author of the program to decide whether to call it a script. The people who call them scripts are mostly users who don't think of themselves as programmers, but they're still the same thing.

Imho scripting comes from making a bunch of programs follow a 'script' (in the cinematic sense), i.e. take a bash script where you write down a sequence of operations performed by some programs. At least that's the best explanation I could come up with.

there isn't. people just call programs that are interpreted instead of compiled scripts. it's not really a technical term.

REPL

A script has to be run by another program whereas a program can run by itself (once compiled)

simple rule of thumb
you can make burgers from a cow but you can't make a cow from burgers

bash scripting is mostly doing things in the OS.
Like copying files, running programs.. etc

>you can't make a cow from burgers

o rly?

I have scripts written in C, and I compile them.

- A real programming language is Turing complete. Some scripting languages aren't.

- Scripts are interpreted at runtime, compiled languages are converted into machine code that a cpu understands natively.

Script = automated, small, does something that you can realistically do manually. also a program

>Script = automated

False, you can make automation programs in C++.

You missed the rest of the criteria. Also, you can make scripts in any language. However, most C++ programs are not scripts.

>tfw you think about ones and zeros when you see ground meat

I think about multithreading

scripting is for scripts and programming is for programs

They're the same thing, and anyone that says otherwise is talking out their ass.
t. Programmer since the 70's