Programming Language vs Scripting Language : IQ(1)
While going through several UI developer interview questions, I found this set of discussions among junior developers or undergrads. What are the root specifications that distinguish a Scripting language from a programming language? Long story short, Scripting is a subset of Programming language. Here we go to compare the performance, complexities, and use cases, and hopefully, it helps you to deal with an interview question.
Parameter 1: Conversion to machine code
A programming language or non-scripting is converted from a higher level to a lower level by a compiler. It compiles the code at once. Programming language execution consumes overall less time of execution and generates an object code.
On the other hand, scripting languages are converted by an interpreter. Each line of the source code is scanned one by one and hence consuming a high amount of time. No pre-compilation is required in this case.
Parameter 2 : Platform dependency
Programming language like C is platform-dependent. The compiler generates an executable file that is platform-dependent. However, a programming language such as JAVA generates a byte code, further run by an interpreter (JVM)on different OS, thus making it a platform-dependent programming language. The executable file and linking require memory consumption. It develops applications from scratch.
Scripting languages are platform / OS independent as no object code is generated. In this case, we may compare in terms of memory consumption as well. Scripting languages like nodejs, Python are cross-platform. Scripting language runs inside another program and is usually used for automation.
Parameter 3: Source code privacy
There are always blurred thoughts on Source code privacy and application privacy. When a programming language generates the executable file, it can be shared to run an application on multiple platforms. It maintains source code privacy. It’s unlike when a scripting language code is downloaded from the host server. It may contain malicious files.
Parameter 4: Complexity
Programming languages are complex and difficult to learn compared to scripting, here we usually write lengthy codes and functions. Scripting languages are easy to code, light-weighted, understand, and require fewer lines to automate a repeated task. Scripting languages require minimum development setup
Parameter 5: Hosting
Scripting languages require a host to run. Non-scripting languages are self-executable and may work as a standalone application. They are dependent on web servers.
Programming and non-scripting: C,C++, JAVA, C#