Initial ideal 2

 Functional programing

Functional programming (FP) is the process of constructing pure function-based software. Employers today are searching for programmers that can use a variety of paradigms to solve issues. Due to its effectiveness and scalability in addressing contemporary issues, functional programming in particular is growing in favor. A declarative programming approach known as "functional programming" uses sequential functions rather than statements to develop programs.(Thelin,2020)



Functional programming (Matthew, 2021)

A declarative programming approach known as "functional programming" uses sequential functions rather than statements to develop programs. Each function accepts an input value and outputs a constant value without changing or being influenced by the state of the program. These functions each do one task, however they can be combined in a particular order to finish more difficult tasks. Since functions can be reused throughout the program and provided as parameters, returned, or called again, the functional paradigm produces highly modular code. (Thelin,2020)


Advantages of functional programming

1.easy debugging:  pure functions and immutable data make it easy to find where variable values are set.

2.lazy evaluation:  functional programs only evaluate computations at the moments they are  needed.

3.Modular:  pure functions do not rely on external variables or states to function, meaning they're easily reused across the program

Disadvantages of functional programming

1. There is no efficient purely functional unsorted dictionary or set

2. There is no purely functional weak hash table.

With a garbage collected imperative language, the relationships between the vertices and edges of a graph can be expressed using weak hash tables.

3. There are no purely functional concurrent collections.

By definition, immutable collections cannot support concurrent mutation. Consequently, if you want a shared mutable collection such as an in-memory database then there is no efficient purely functional solution.


Functional programming languages

Not all programming languages support functional programming. some languages, like Haskell, are designed to be functional programming languages., other languages, like JavaScript, have functional capabilities and OOP capabilities, and others do not support functional programming at all. (Jun,2016).



References

Dr Jon Harrop MA MSci PhD (Cantab) has been a director of IDTechEx09. Jun 2016) 





















































    




Thelin, R. (2020) What is functional progamming? explained in python, JS, and Java, Educative. Available at: https://www.educative.io/blog/what-is-functional-programming-python-js-java (Accessed: October 19, 2022).

  (2021)  InfoWorld https://www.infoworld.com/article/3613715/what-is-functional-programming-a-practical-guide.html (Accessed in November 5, 2022)

Comments