What is a scripting language and the Difference Between it and programming language

What is a Scripting language

Tags: scripting-language, programming-language, programming

Intro

All scripting languages are programming languages.

Early programmers used programming languages to build a software like Photoshop, Browsers, Microsoft Office, etc.

As time passed, the need to upgrade the programming languages to incorporate additional functionalities and provide an enhanced programming interface. Thus, scripting languages came into being.

What is a Scripting Language?

A scripting language is a series of commands that can be executed without the need for compiling, interpreted. It is translated into machine code when the code is run line by line.

A compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language). The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower-level language (e.g. assembly language, object code, or machine code) to create an executable program. The easiest way to understand how a compiler function is to think about various operating systems. For instance, Windows programs are compiled to run on Windows platforms and thus are not compatible with Mac.

Scripting languages are interpreted to translate commands and are directly interpreted from source code, not requiring a compilation step. Other programming languages, on the other hand, may require a compiler to translate commands into machine code before it can execute those commands.

how Programming Language compiled vs how Scripting Language interpreted

differences between Scripting Language and Programming Language

It is always good to know the difference between interpreted vs compiled programming languages. Even though modern advanced hardware and coding practices are beginning to make the distinction somewhat obsolete

Application of Scripting languages

Scripting languages are vastly used in web development. It helps to make complex web pages and applications with simplicity. As explained above, both the server and client sides of a web application are coded using scripting languages. They are used in system administration, for example, shells for operating systems. They are also used in embedded systems, in the making of extensions, plugins, and games, etc.

Advantages and Pros of Scripting Languages

  • To automate certain tasks in a program.

  • Easy to transfer since they are portable between operating systems.

  • Extracting information from a data set.

  • It is easier to learn and write since it's Less code-intensive as compared to traditional programming languages.

  • They are open source, Therefore, anyone around the world can use them and contribute to them.

  • If you are a beginner, they are a great way to start with programming languages, as they are quite easy to learn and code.

  • Scripting languages do not create .exe executable files, snd they have interpreted bylines so they take fewer memory resources.

disadvantages and Cons of Scripting Languages

There are not a whole lot of cons to using scripting languages.

  • Maybe some companies don’t want scripts to be read by everyone, so they use server-side scripts to avoid releasing them to the public.

  • The interpreter analyzes each statement line by line during execution, therefore don’t perform many optimizations to execute the code faster.

  • Installing an interpreter program can be a hassle.

  • Sometimes scripts are slower than programs since the interpreter is slower than the compiler because it converts each statement to the machine code during execution. However, the compiling languages get converted into machine code beforehand.

  • Demand line-by-line conversion and require a host

Another point to be noted is that while classifying a language as a scripting language or programming language, the environment on which it would execute must be taken into consideration. The reason why this is important is that we can design an interpreter for C language and use it as a scripting language, and at the same time, we can design a compiler for JavaScript and use it as a non-scripting(compiled language). A live example of this is V8, the JavaScript engine of Google Chrome, which compiles the JavaScript code into machine code, rather than interpreting . (source geeksforgeeks)

Some scripting languages traditionally used without an explicit compilation step are JavaScript, PHP, Python, VBScript.