In the world of programming, many languages are used for stringing code or coding. Starting from assembler machine language, then c, c ++, python, there is also some kind of Java, Ruby and many others. Programming also has the term object oriented programming and functional programming. When people talk about functional programming, they always mention features that are offered functional programming such as data that doesn’t change and tail call optimization.
They also always mention techniques that are always used in functional programming such as mapping, reducing, and other top-level functions. They also always say the advantages of functional programming such as parallelization, and determinism.
Functional programming has important characteristics, namely ‘The absence of side effects’. This means that functional programming does not depend on data that is out of function, and does not change data that is outside the function.
The following are the advantages of functional programming.
- Recursive usage and first-class functions allow us to display simple evidence from the code structure.
- Parallelization, lazy evaluation, determinism and much more.
- Functional programming is included in the paradigm of writing code without changing the state. To implement functional programming, we can use various programming languages that support first-class functions.
Functional programming is programming that has the characteristics of ‘The absence of side effects’. This means that the functions written are not dependent on data. Functional programming also brings new styles in writing code so that it can save more lines of code
Functional programming is programming with mathematical functions. The idea is, every time the same argument is given, the mathematical function returns the same result and the function signature must convey all information about the possible input received and the output it produces. By following two simple principles, namely – Referential transparency and Honesty functions.
That’s it for today.
Via https://www.codepolitan.com/pemrograman-fungsional-itu-apa-sih | https://medium.com/@naveenrtr/introduction-to-functional-programming-with-c-b167f15221e1