1.7 Classification of programming languages
Programming in C
Classification of Programming Languages
Programming languages can be classified in various ways. According to the extent of translation required to generate machine instructions from a program, programming languages are classified into low-level languages and high-level languages.
Low-Level Languages
Low-level languages are closer to the native language of the computer. Programs written in these languages have very little abstraction from the hardware.
Machine Language
Machine language consists of instructions written in binary code (0s and 1s). These instructions are executed directly by the processor and do not require any translation. Since machine language depends on the hardware, programs written in machine language are machine dependent and difficult to understand and debug.
Assembly Language
Assembly language uses symbolic mnemonics instead of binary codes. Each assembly instruction performs only one operation, and coding is done at the individual instruction level. Assembly language programs require a translator called an assembler. Assembly language is also considered a low-level language because it is closely related to the machine architecture.
High-Level Languages
High-level programming languages provide a high level of abstraction from the actual machine hardware. They are easier to write, understand, debug, and maintain. These languages are machine independent and require translators such as compilers or interpreters.
High-level languages can further be classified based on programming paradigm, which refers to the methodology and style of problem solving. High-level languages are categorized into procedural, non-procedural, and problem-oriented languages.
Procedural Programming Languages
In procedural programming, a program is considered as a set of logically related instructions executed in a specific order. Programs are divided into small self-contained segments known as procedures, subroutines, or functions, which can be reused without repeated coding. This approach improves program clarity and maintainability.
Algorithmic Languages
In algorithmic languages, the programmer specifies the step-by-step procedure to solve a problem using a top-down approach. A complex problem is divided into smaller problems, and each is implemented using functions or procedures.
Examples: C, COBOL, PASCAL, FORTRAN
Object-Oriented Languages
Object-oriented programming focuses on objects rather than functions. A program is a collection of interacting objects, where each object contains both data and methods.
Key features of object-oriented languages include:
-
Abstraction: Focusing on essential features while hiding unnecessary details using classes and objects.
-
Encapsulation and Data Hiding: Binding data and functions into a single unit.
-
Inheritance: Reusing and extending existing classes without rewriting code.
-
Polymorphism: Allowing one interface to represent multiple methods or behaviors.
-
Reusable Code: Breaking programs into reusable objects.
These features help in developing reliable, reusable, and cost-effective software.
Examples: C++, JAVA, SMALLTALK
Scripting Languages
Scripting languages act as glue languages that combine components written in other languages. These languages are usually interpreted and used for automation and web applications.
Examples: VBScript, Python, Tcl, Perl, JavaScript
Non-Procedural Languages
Non-procedural languages focus on what is to be done, rather than how it is done.
Functional Languages
Functional languages solve problems by applying a set of functions to input data. Programs consist of function evaluations with arguments.
Examples: LISP, ML, Scheme
Logic-Based Languages
Logic programming languages express programs as facts and rules. Execution begins by posing a query, and the system determines whether the query is true or false based on given facts.
Example: PROLOG
Problem-Oriented Languages
Problem-oriented languages provide pre-defined procedures and functions to solve specific classes of problems. The user writes programs using these built-in functions.
Numerical and Scientific Languages
These languages are widely used in engineering and scientific computations such as matrix operations, signal processing, and system modeling.
Example: MATLAB
Symbolic Manipulation Languages
These languages are used for symbolic computation, such as simplifying algebraic expressions and performing symbolic integration.
Example: MATHEMATICA
Markup Languages
Markup languages are not programming languages. They are used to describe the structure and layout of documents.
Example: HTML
However, some extensions like JSP, JSTL, and XSLT include limited programming capabilities.
Conclusion
Programming languages are classified based on level of abstraction, problem-solving approach, and application domain. Each category of language serves a specific purpose, and selecting the appropriate language depends on the nature of the problem and computing requirements.
📖 Reference
The content for this subject is prepared by referring to the standard textbook
“Computer Fundamentals and Programming in C” by Pradip Dey and Manas Ghosh,
Second Edition, Oxford University Press (2018).
The explanations are exam-oriented and strictly aligned with the concepts presented in the reference book.
Aivette-coi is created with the intention of helping college students learn smartly, revise quickly, and approach exams with confidence.
With love and care,
by Aivette 💙
Comments
Post a Comment