Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (1 vote)
48 views

Logical Programming Languages and Functional Programming Languages

The document discusses logical programming languages and functional programming languages. Logical programming languages are based on formal logic and represent facts and rules within a system of formal logic. Functional programming languages are based on functions and handle symbolic computation and list processing. The document compares the advantages and disadvantages of both approaches.

Uploaded by

nahian zarif
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
48 views

Logical Programming Languages and Functional Programming Languages

The document discusses logical programming languages and functional programming languages. Logical programming languages are based on formal logic and represent facts and rules within a system of formal logic. Functional programming languages are based on functions and handle symbolic computation and list processing. The document compares the advantages and disadvantages of both approaches.

Uploaded by

nahian zarif
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

LOGICAL PROGRAMMING LANGUAGES AND FUNCTIONAL

PROGRAMMING LANGUAGES

By: Nahian Zarif Khan


LOGICAL PROGRAMMING LANGUAGES

 All logical programming languages can be generalized into a category of programming languages called
declarative languages.

 Has a few advantages :-


 Classified as high-level languages as they implement computation’s logic rather than mechanics.

 They allow data to be represented both extensionally and intentionally.


LOGICAL PROGRAMMING LANGUAGES

 Disadvantages include:-
 There is no suitable method of representing computational concepts that originate in a built-in mechanism of state variables
like it is found in conventional languages.
 Initially, due to insufficient investment in complimentary technologies, users were poorly served.
 Poor facilities for supporting arithmetic ,etc.
 Limited to which types of problems it can solves.
 Slow program execution.
FUNCTIONAL PROGRAMMING LANGUAGES

 Type of programming paradigm in which everything is done with the help of functions and using functions as its building block.
 Has a few advantages :-
 Leads to fewer bugs.

 Easier to test. Reasons: (i)Outputs same for any given inputs (ii) Pure functions don’t depend on any state apart from the inputs

 Function signatures are more trusted .

 Concurrency is more easily kept safe , pure functions are definitionally thread-safe. No chances of race condition occurrence.
FUNCTIONAL PROGRAMMING LANGUAGES

 Disadvantages include:-
 Can be less efficient than others.
 They tend to require a large amount of time and memory.
 Purely functional languages are not really used in commercial software developments.
 At most times, there are problems involving many variables or a lot of sequential activities where it should be best handled
with OOP rather than functional programming languages.
DIFFERENCES
Logical Programming languages Functional programming languages
Based on formal logic Based on functions
Programs are constructed by applying and composing Usually express or represent facts and rules related to
functions problems within a system of formal logic
These are specially designed for fault diagnosis, These are specially designed to manage and handle
natural language processing, planning, and machine symbolic computation and list processing applications.
learning.  
Its main aim is to allow machines to reason because it Its main aim is to reduce side effects that are
is very useful for representing knowledge accomplished by isolating them from the rest of the
software code
It is data-driven, array-oriented, used to express It reduces code redundancy, improves modularity,
knowledge, etc. solves complex problems, increases maintainability,
etc.
Testing is comparatively more difficult as compared to Testing is much easier as compared to logical
functional programming programming
THANK YOU

You might also like