Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA Tutorial
  • Data Structures
  • Algorithms
  • Array
  • Strings
  • Linked List
  • Stack
  • Queue
  • Tree
  • Graph
  • Searching
  • Sorting
  • Recursion
  • Dynamic Programming
  • Binary Tree
  • Binary Search Tree
  • Heap
  • Hashing
  • Divide & Conquer
  • Mathematical
  • Geometric
  • Bitwise
  • Greedy
  • Backtracking
  • Branch and Bound
  • Matrix
  • Pattern Searching
  • Randomized
Open In App
Next Article:
Difference between Functional and Imperative Programming
Next article icon

Difference Between Functional and Logical Programming

Last Updated : 24 Feb, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

Programming paradigm is an approach to solve 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 paradigms. Apart from varieties of programming languages, there are lots of paradigms to fulfill each and every demand. They are discussed below as follows:

Functional Programming is a type of programming paradigm in which everything is done with the help of functions and using functions as its basic building blocks. In it, we simply try to bind each and everything in a purely mathematical functions' style. Programs are generally written at a higher level and are therefore much easier to comprehend.  

Logical Programming is a type of programming paradigm that uses logic circuits to control how facts and rules about the problems within the system are represented or expressed. In it, logic is used to represent knowledge, and inference is used to manipulate it. It tells the model about how to accomplish a goal rather than what goal to accomplish. 

Now let us go through the major key differences between them after going through the basics of both of them. Differences are shown below in a tabular format as follows:

Functional Programming

Logical Programming

It is totally based on functions.It is totally based on formal logic.  
 In this programming paradigm, programs are constructed by applying and composing functions.  In this programming paradigm, program statements usually express or represent facts and rules related to problems within a system of formal logic.  
These are specially designed to manage and handle symbolic computation and list processing applications.  These are specially designed for fault diagnosis, natural language processing, planning, and machine learning.
Its main aim is to reduce side effects that are accomplished by isolating them from the rest of the software code.Its main aim is to allow machines to reason because it is very useful for representing knowledge.  
Some languages used in functional programming include Clojure, Wolfram Language, Erland, OCaml, etc. Some languages used for logic programming include Absys, Cycl, Alice, ALF (Algebraic logic functional programming language), etc.
It reduces code redundancy, improves modularity, solves complex problems, increases maintainability, etc.  It is data-driven, array-oriented, used to express knowledge, etc.  
It usually supports the functional programming paradigm.  It usually supports the logic programming paradigm.  
Testing is much easier as compared to logical programming.  Testing is comparatively more difficult as compared to functional programming.  
It simply uses functions.It simply uses predicates. Here, the predicate is not a function i.e., it does not have a return value.  

Next Article
Difference between Functional and Imperative Programming
author
madhurihammad
Improve
Article Tags :
  • Competitive Programming
  • Difference Between
  • Programming Language
  • DSA
  • Functions
  • logical-thinking
Practice Tags :
  • Functions
  • logical-thinking

Similar Reads

  • Difference between Functional and Imperative Programming
    Functional Programming: Functional Programming, as the name suggests, is a type of programming paradigm that is being created explicitly simply to support a purely functional approach to solving problems. This type of programming is mainly used when solutions are easily expressed in function and hav
    3 min read
  • Difference between Program and Function
    1. Program : Program, as name suggest, are set or collection of instructions used by computer to execute specific task and these are created using particular programming languages such as C++, Python, Ruby, etc. 2. Function : Function, as name suggests, is basic concept in computer programming that
    2 min read
  • Difference between Functional Programming and Object Oriented Programming
    What is Functional Programming?In functional programming, we have to build programs using functions. An example of functional programming is Haskell language. What is Object Oriented Programming?Object-oriented programming is built by using classes and objects. In this, we have concepts of encapsula
    3 min read
  • Difference between Function and Procedure
    Pre-requisites: What is SQL? Structured Query Language is a computer language that we use to interact with a relational database.SQL is a tool for organizing, managing, and retrieving archived data from a computer database. In this article, we will see the difference between Function and Procedure.
    3 min read
  • Differences between Procedural and Object Oriented Programming
    This article focuses on discussing the differences between procedural and object-oriented programming. Procedural Programming Procedural Programming can be defined as a programming model which is derived from structured programming, based upon the concept of calling procedure. Procedures, also known
    2 min read
  • Differences between Functional and Non-functional Testing
    What is Functional Testing?Functional testing is a type of software testing in which the system is tested against the functional requirements and specifications. Functional testing ensures that the requirements or specifications are properly satisfied by the application. This type of testing is part
    2 min read
  • Difference between Program and Product
    A program is a set of instructions written by a programmer to perform a specific task on a computer. In contrast, a product is a complete software solution developed through a series of stages, known as the software development life cycle, to address a specific problem or need for an enterprise. Pro
    4 min read
  • Difference between Brute Force and Dynamic Programming
    Brute Force: It gives a solution to a problem by using the most straightforward method. However, it is typically not a very optimal solution or one that is flexible for future changes, but it gets the job done. The proverbial brute force programming example is trying all optimal solutions for reachi
    6 min read
  • Difference Between Function and Method
    Function: A Function is a reusable piece of code. It can have input data on which it can operate (i.e. arguments) and it can also return data by having a return type. It is the concept of procedural and functional programming languages. Method: The working of the method is similar to a function i.e.
    2 min read
  • Difference Between Unit Tests and Functional Tests
    The article focuses on discussing the differences between Unit Testing and Functional Testing. The following topics will be discussed here: What is Unit Testing?What is Functional Testing?Unit Testing vs Functional Testing Let's start discussing each of these topics in detail. What is Unit Testing?
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences