Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Programming Language Paradigms and Models

Programming Language Paradigm Models: A Paradigm can be termed as a method to solve some problem or do some task.

Introduction

Programming Language Paradigms Models: A programming paradigm is an approach to solving problems using some programming language or also we can say it is a method to solve a problem using tools and techniques that are available to us following some approach.

There are lots of Programming languages that are known but all of them need to follow some strategy when they are implemented and this methodology/strategy is a paradigm. Apart from varieties of programming languages, there are lots of paradigms to fulfill each and every demand.

They are discussed below:

  1. Imperative Programming Paradigm
  2. Declarative Programming Paradigm

Imperative Programming Paradigm

It is one of the oldest programming paradigms. It features close relation to machine architecture. It is based on Von Neumann’s architecture. It works by changing the program state through assignment statements. It performs a step-by-step task by changing state. The main focus is on how to achieve the goal. The paradigm consists of several statements and after execution, all the result is stored.

Advantage:

  1. Very simple to implement
  2. It contains loops, variables, etc.

Disadvantage:

  1. A complex problem cannot be solved
  2. Less efficient and less productive
  3. Parallel programming is not possible

Examples

C
Fortran
Basic

Imperative programming is divided into three broad categories: Procedural, OOP, and parallel processing. These paradigms are as follows:

Procedural Programming Paradigm

This paradigm emphasizes the procedure in terms of the underlying machine model. There is no difference between the procedural and imperative approaches. It has the ability to reuse the code and it was a boon at that time when it was in use because of its reusability.

Examples of Procedural programming paradigm:

C : developed by Dennis Ritchie and Ken Thompson
C++ : developed by Bjarne Stroustrup
Java : developed by James Gosling at Sun Microsystems
ColdFusion : developed by J J Allaire
Pascal : developed by Niklaus Wirth 

Object-oriented Programming 

The program is written as a collection of classes and objects which are meant for communication. The smallest and basic entity is an object and all kind of computation is performed on the objects only. More emphasis is on data rather than procedure. It can handle almost all kinds of real-life problems which are today in scenarios.

Advantages:

  • Data security
  • Inheritance
  • Code reusability
  • Flexible and abstraction is also present
Examples of Object Oriented programming paradigm:

Simula : first OOP language
Java : developed by James Gosling at Sun Microsystems
C++ : developed by Bjarne Stroustrup
Objective-C : designed by Brad Cox
Visual Basic .NET : developed by Microsoft
Python : developed by Guido van Rossum
Ruby : developed by Yukihiro Matsumoto 
Smalltalk : developed by Alan Kay, Dan Ingalls, Adele Goldberg 

Parallel Processing Approach

Parallel processing is the processing of program instructions by dividing them among multiple processors. A parallel processing system possesses many numbers of processors with the objective of running a program in less time by dividing them.

This approach seems to be like divide and conquer. Examples are NESL (one of the oldest ones) and C/C++ also supports because of some library functions.

Declarative programming paradigm

It is divided into Logic, Functional, and Database. In computer science, declarative programming is a style of building programs that express the logic of a computation without talking about its control flow.

It often considers programs as theories of some logic. It may simplify writing parallel programs. The focus is on what needs to be done rather than how it should be done basically emphasizing what the code is actually doing.

It just declares the result we want rather than how it has been produced. This is the only difference between imperative (how to do) and declarative (what to do) programming paradigms. 

Getting deeper we would see logic, functional, and database paradigms.

Logic programming paradigms

It can be termed as an abstract model of computation. It would solve logical problems like puzzles, series, etc. In logic programming we have a knowledge base that we know before and along with the question and knowledge base which is given to machines, it produces results.

In normal programming languages, such a concept of the knowledge base is not available but while using the concept of artificial intelligence, and machine learning we have some models like the Perception model which is using the same mechanism. 

In logical programming, the main emphasis is on the knowledge base and the problem. The execution of the program is very much like proof of a mathematical statement, e.g., Prolog

Functional programming paradigms

The functional programming paradigm has its roots in mathematics and it is language-independent. The key principle of this paradigm is the execution of a series of mathematical functions. The central model for the abstraction is the function which is meant for some specific computation and not the data structure.

Data are loosely coupled to functions. The function hides their implementation. A function can be replaced with its values without changing the meaning of the program.

Some of the languages like Perl, and javascript mostly use this paradigm.

Examples of Functional programming paradigm:

JavaScript : developed by Brendan Eich
Haskell : developed by Lennart Augustsson, Dave Barton
Scala : developed by Martin Odersky
Erlang : developed by Joe Armstrong, Robert Virding
Lisp : developed by John Mccarthy
ML : developed by Robin Milner
Clojure : developed by Rich Hickey 

Database/ Data-driven programming approach

Programming Language Paradigm Models: This programming methodology is based on data and its movement. Program statements are defined by data rather than hard-coding a series of steps. A database program is the heart of a business information system and provides file creation, data entry, update, query, and reporting functions.

There are several programming languages that are developed mostly for database applications. For example SQL. It is applied to streams of structured data, for filtering, transforming, aggregating (such as computing statistics), or calling other programs. So it has its own wide application.

People Also Read

UGC NET Computer Science Syllabus 2023

Also if you are a fitness freak, you can access our online nutrition supplement store here

Best Whey Protein and Mass Gainers

Conclusion

Programming Language Paradigms Models:  

I hope this article helps you to explore the various Programming Language Paradigms Models. If you have any further questions, please don’t hesitate to ask.

The post Programming Language Paradigms and Models appeared first on Howwikis.



This post first appeared on Gmail Customer Service-Hotmail Customer Service, please read the originial post: here

Share the post

Programming Language Paradigms and Models

×

Subscribe to Gmail Customer Service-hotmail Customer Service

Get updates delivered right to your inbox!

Thank you for your subscription

×