Difference between a Scripting Language and a Programming Language

Himanshu Singh
3 min readMar 12, 2023

If you are into coding for a quite good amount of time then you must have heard of these terms. Whenever we talk about any loosely typed language then most of the time we say that it must be a Scripting Language, like JavaScript, Python, etc.

And when we talk about strictly typed language then we refer to them as Programming Language, like C, C++, Java, etc.

💡 If you don’t know why we use terms loosely typed language and strictly typed language then,

Loosely typed languages are those languages in which while declaring a variable we don’t have to specify that the variable will store a number type value, or string type value, or any other. like JavaScript, Python.

While strictly typed languages are those languages in which at the time of the declaration of a variable, we specify what type of value the variable will store. It will be a number type, or string type, or any other. like C++, Java.

But being strictly typed or loosely typed is not the only difference between a scripting language and a programming language.

➡️ Another difference between a scripting language and a programming language is that one is compiled and the other is interpreted.

In programming languages, like C++, and Java, to run a program there is a two-step process.

  • Step One: compile your code and generate a machine-readable version of it.
  • Step Two: run that machine-readable version to get your result.

So, we say that these languages are compiled languages. We have to compile them first, to get our desired result.

While in the case of scripting languages, like JavaScript, we write our code and then directly see the result on the browser (if you are writing JavaScript on the client side). So, we do not have to do anything from our side to run the script. Though the browser, in this case, will execute the code line by line and will the result.

That’s why we say that these languages are interpreted language.

➡️ And one more difference between them is the environment in which they run (or get executed).

Like in a scripting language, in the runtime environment, the Interpreter runs each line of the program one by one and shows the result based on the interpretation of that particular line. If there is any kind of error then it will show that, and if there is no error then it will show our desired result.

While in the case of programming languages, they first get compiled so if there is an error regarding syntax or a compilation error, we get it at this time. And if there is an error regarding the semantic or a runtime error, we get it when we run the machine-readable code.

🏁 That’s all for this

Hoping! you will get to know something new from this blog. If you want to read more on this topic, then I would recommend reading this article, scripting-language-vs-programming-language

Please do give your feedback in the comments and also do let me know how was this blog. And till the next time, stay tuned!

I would love to connect with you all on Twitter, and you can tell me about this blog there also.

--

--

Himanshu Singh

I write blogs around React JS, JavaScript, Web Dev, and Programming. Follow to read blogs around them.