Programming Language
As we know, to communicate with a person, we need a specific language,
similarly to communicate with computers, programmers also need a language is
called Programming language. A programming language is a computer
language that is used by programmers (developers) to communicate with
computers. It is a set of instructions written in any specific language ( C, C++,
Java, Python) to perform a specific task.. A programming language is mainly used
to develop desktop applications, websites, and mobile applications.
Types of programming language
1. Low-level programming language
Low-level language is machine-dependent (0s and 1s) programming
language. The processor runs low- level programs directly without the
need of a compiler or interpreter, so the programs written in low-level
language can be run very fast. Low-level language is further divided into
two parts -
a. Machine Language
Machine language is a type of low-level programming language. It is also
called as machine code or object code. Machine language is easier to read
because it is normally displayed in binary or hexadecimal form (base 16)
form. It does not require a translator to convert the programs because
computers directly understand the machine language programs.
The advantage of machine language is that it helps the programmer to
execute the programs faster than the high-level programming language.
b. Assembly Language
Assembly language (ASM) is also a type of low-level programming
language that is designed for specific processors. It represents the set of
instructions in a symbolic and human-understandable form. It uses an
assembler to convert the assembly language to machine language.
The advantage of assembly language is that it requires less memory and
less execution time to execute a program.
2. High-level programming language
High-level programming language (HLL) is designed for developing user-
friendly software programs and websites. This programming
language requires a compiler or interpreter to translate the program into
machine language (execute the program).
The main advantage of a high-level language is that it is easy to read,
write, and maintain.
High-level programming language includes Python, Java, JavaScript,
PHP, C#, C++, Objective C, Cobol, Perl, Pascal, LISP, FORTRAN,
and Swift programming language.
A high-level language is further divided into three parts -
a. Procedural Oriented programming language
Procedural Oriented Programming (POP) language is derived from
structured programming and based upon the procedure call concept. It
divides a program into small procedures called routines or functions.
Procedural Oriented programming language is used by a software
programmer to create a program that can be accomplished by using a
programming editor like IDE, Adobe Dreamweaver, or Microsoft Visual
Studio.
The advantage of POP language is that it helps programmers to easily
track the program flow and code can be reused in different parts of the
program.
b. Object-Oriented Programming language
Object-Oriented Programming (OOP) language is based upon the objects. In
this programming language, programs are divided into small parts called objects. It
is used to implement real-world entities like inheritance, polymorphism,
abstraction, etc in the program to makes the program resusable,
efficient, and easy-to-use.
The main advantage of object-oriented programming is that OOP is faster
and easier to execute, maintain, modify, as well as debug. Object-
Oriented Programming language follows a bottom-up approach.
Example:C++, Java, Python, C#, etc.
c. Natural language
Natural language is a part of human languages such as English, Russian,
German, and Japanese. It is used by machines to understand,
manipulate, and interpret human's language. It is used by developers
to perform tasks such as translation, automatic summarization, Named Entity
Recognition (NER), relationship extraction, and topic segmentation.
The main advantage of natural language is that it helps users to ask
questions in any subject and directly respond within seconds.
3. Middle-level programming language
Middle-level programming language lies between the low-level programming
language and high-level programming language. It is also known as the
intermediate programming language and pseudo-language.
A middle-level programming language's advantages are that it supports
the features of high-level programming, it is a user-friendly language, and
closely related to machine language and human language.
Example:C, C++, language
Most commonly used Programming Language
As we all know, the programming language makes our life simpler. Currently, all
sectors (like education, hospitals, banks, automobiles, and more ) completely
depend upon the programming language.
There are dozens of programming languages used by the industries. Some most
widely used programming languages are given below -
1. Python
Python is one of the most widely used user-
friendly programming languages. It is an open-
source and easy to learn programming language
developed in the 1990s. It is mostly used
in Machine learning, , Artificial intelligence, , Big
Data, GUI based desktop applications, and
Robotics.
Advantages
o Python is easy to read, easy to understand, and easy to write.
o It integrates with other programming languages like C, C++, and Java.
o Python executes code line-by-line, so it is easy for the programmer to
find the error that occurred in the code.
o Python is platform-independent means you can write code once and
run it anywhere.
Disadvantages
o Python is not suitable for developing mobile applications and games.
o Python works with the interpreter. That's why it is slower than other
programming languages like C and C++.
2. Java
Java is a simple, secure, platform-independent,
reliable, architecture-neutral high-level
programming language developed by Sun
Microsystems in 1995. Now, Java is owned by
Oracle. It is mainly used to develop bank, retail,
information technology, android, big data, research community, web, and
desktop applications.
Advantages
o Java is easy to write, compile, learn, and debug as compared to other
programming languages.
o It provides an ability to run the same program on different platforms.
o It is a highly secured programming language because in java, there is
no concept of explicit pointers.
o It is capable of performing multiple tasks at the same time.
Disadvantages
o Java consumes more memory and slower than other programming
languages like C or C++.
o It does not provide a backup facility.
3. C
C is a popular, simple, and flexible general-purpose
computer programming language. Dennis M Ritchie
develops it in 1972 at AT&T. It is a combination of
both low-level programming language as well as a
high-level programming language. It is used to
design applications like Text Editors, Compilers,
Network devices, and many more.
Advantages
o C language is easy to learn.
o It is fast, efficient, portable, easy to extend, powerful, and flexible
programming language.
o It is used to perform complex calculations and operations such as
MATLAB.
o It provides dynamic memory allocation to allocate memory at the run
time.
Disadvantages
o In the C programming language, it is very difficult to find the errors.
o C does not support the concepts of constructors, destructors,
abstraction, polymorphism, encapsulation, and namespace like OOPs.
4. C++
C++ is one of the thousands of programming
languages that we use to develop software. C++
programming language is developed by Bjarne
Stroustrup in 1980. It is similar to the C programming
language but also includes some additional features
such as exception handling, object-oriented
programming, type checking, etc.
Advantages
o C++ is a simple and portable structured programming language.
o It supports OOPs features such as Abstraction, Inheritance,
Encapsulation.
o It provides high-level abstraction and useful for a low-level
programming language, and more efficient for general-purpose.
o C++ is more compatible with the C language.
Disadvantages
o C++ programming language is not secured as compared to other
programming languages like Java or Python.
o C++ can not support garbage collection.
o It is difficult to debug large as well as complex web applications.
5. C#
C# (pronounced as C sharp) is a modern, general-
purpose, and object-oriented programming language
used with XML based Web services on the .NET
platform. It is mainly designed to improve
productivity in web applications. It is easier to learn
for those users who have sufficient knowledge of
common programming languages like C, C++, or
Java.
Advantages
o C# is a modern, type-safe, easy, fast, and open-source programming
language that is easily integrated with Windows.
o The maintenance of C# (C sharp) is lower than the C++ programming
language.
o C# is a pure object-oriented programming language.
o C# includes a strong memory backup facility. That's why it avoids the
problem of memory leakage.
Disadvantages
o C# is less flexible because it is completely based on Microsoft .Net
framework.
o In C#, it is difficult to write, understand, debug, and maintain
multithreaded applications.
6. JavaScript
JavaScript is a type of scripting language that is
used on both client-side as well as a server-side. It is
developed in the 1990s for the Netscape Navigator
web browser. It allows programmers to implement
complex features to make web pages alive. It helps
programmers to create dynamic websites, servers,
mobile applications, animated graphics, games, and
more.
Advantage
o JavaScript helps us to add behaviour and interactivity on the web
page.
o It can be used to decrease the loading time from the server.
o It has the ability to create attractive, dynamic websites, and rich
interfaces.
o JavaScript is a simple, versatile, and lightweight programming
language.
o JavaScript and its syntax are easy to understand.
Disadvantage
o JavaScript is completely based on the browser.
o It does not support multiple inheritance.
o It is less secure compared to other programming languages.
7. R
Currently, R programming is one of the popular
programming languages that is used in data
analytics, scientific research, machine learning
algorithms, and statistical computing. It is
developed in 1993 by Ross Ihaka and Robert Gentleman. It helps
marketers and data scientists to easily analyze, present, and visualize
data.
Advantages
o R programming provides extensive support for Data Wrangling.
o It provides an easy-to-use interface.
o It runs on any platform like Windows, Linux, and Mac.
o It is an open-source and platform-independent programming language.
Disadvantages
o R programming does not support 3D graphics.
o It is slower than other programming languages.
8. PHP
PHP stands for Hypertext Preprocessor. It is an
open-source, powerful server-side scripting
language mainly used to create static as well as
dynamic websites. It is developed by Rasmus Laird
in 1994. Inside the php, we can also write HTML ,
CSS , and JavaScript code. To save php file, file
extension .php is used.
Advantages
o PHP is a more secure and easy-to-use programming language.
o It supports powerful online libraries.
o It can be run on a variety of operating systems such as Windows,
Linux, and Mac.
o It provides excellent compatibility with cloud services.
Disadvantages
o PHP is not capable of handling a large number of applications and not
suitable for large applications.
o It is quite difficult to maintain.
Language Processors: Assembler, Compiler and Interpreter
Language Processors
Compilers, interpreters, translate programs written in high-level languages into machine code that a
computer understands. And assemblers translate programs written in low-level or assembly
language into machine code. In the compilation process, there are several stages. To help
programmers write error-free code, tools are available.
Assembly language is machine-dependent, yet mnemonics used to represent instructions in it are
not directly understandable by machine and high-Level language is machine-independent. A
computer understands instructions in machine code, i.e. in the form of 0s and 1s. It is a tedious task
to write a computer program directly in machine code. The programs are written mostly in high-level
languages like Java, C++, Python etc. and are called source code. These source code cannot be
executed directly by the computer and must be converted into machine language to be executed.
Hence, a special translator system software is used to translate the program written in a high-level
language into machine code is called Language Processor and the program after translated into
machine code (object program/object code). The language processors can be any of the following
three types:
1. Compiler :
The language processor that reads the complete source program written in high-level
language as a whole in one go and translates it into an equivalent program in machine
language is called a Compiler. Example: C, C++, C#, Java.
In a compiler, the source code is translated to object code successfully if it is free of errors.
The compiler specifies the errors at the end of the compilation with line numbers when
there are any errors in the source code. The errors must be removed before the compiler
can successfully recompile the source code again
2. Assembler :
The Assembler is used to translate the program written in Assembly language into machine
code. The source program is an input of an assembler that contains assembly language
instructions. The output generated by the assembler is the object code or machine code
understandable by the computer. Assembler is basically the 1st interface that is able to
communicate humans with the machine. We need an Assembler to fill the gap between
human and machine so that they can communicate with each other. code written in
assembly language is some sort of mnemonics(instructions) like ADD, MUL, MUX, SUB, DIV,
MOV and so on. and the assembler is basically able to convert these mnemonics in Binary
code. Here, these mnemonics also depend upon the architecture of the machine. For
example, the architecture of intel 8085 and intel 8086 are different.
3. Interpreter
The translation of a single statement of the source program into machine code is done by a
language processor and executes immediately before moving on to the next line is called an
interpreter. If there is an error in the statement, the interpreter terminates its translating
process at that statement and displays an error message. The interpreter moves on to the
next line for execution only after the removal of the error. An Interpreter directly executes
instructions written in a programming or scripting language without previously converting
them to an object code or machine code.
Example: Perl, Python and Matlab.
Difference between Compiler and Interpreter
Compiler Interpreter
A compiler is a program that converts the entire An interpreter takes a source program and
source code of a programming language into runs it line by line, translating each line as it
executable machine code for a CPU. comes to it
The compiler takes a large amount of time to
analyze the entire source code but the overall An interpreter takes less amount of time to
execution time of the program is comparatively analyze the source code but the overall
faster. execution time of the program is slower.
The compiler generates the error message only
after scanning the whole program, so debugging Its Debugging is easier as it continues
is comparatively hard as the error can be translating the program until the error is
present anywhere in the program. met.
The compiler requires a lot of memory for It requires less memory than a compiler
generating object codes. because no object code is generated.
Generates intermediate object code. No intermediate object code is generated.
For Security purpose compiler is more useful. The interpreter is a little vulnerable in case
Compiler Interpreter
of security.
Examples: C, C++, Java Examples: Python, Perl, JavaScript, Ruby