Logical Programming Languages and Functional Programming Languages
Logical Programming Languages and Functional Programming Languages
PROGRAMMING LANGUAGES
All logical programming languages can be generalized into a category of programming languages called
declarative 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
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