This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
dido:public:s_cli:05_contents:01_prt:02_basics:03_paradigim:funcpro [2021/05/01 21:29] nick ↷ Page moved from dido:public:s_cli:05_contents:02_basics:03_paradigim:funcpro to dido:public:s_cli:1_part:05_contents:05_contents:02_basics:03_paradigim:funcpro |
dido:public:s_cli:05_contents:01_prt:02_basics:03_paradigim:funcpro [2021/08/13 13:25] (current) murphy |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== 2.1.3.3 Functional Programming ====== | ====== 2.1.3.3 Functional Programming ====== | ||
| - | [[dido:public:s_cli:05_contents:02_basics:03_paradigim:start | Return to Programming Paradigm ]] | + | [[dido:public:s_cli:05_contents:01_prt:02_basics:03_paradigim:start| Return to Programming Paradigm ]] |
| The [[dido:public:ra:xapend:xapend.a_glossary:f:functionalprogramming]] methodology focuses on results, not the process. Therefore, there can be many different ways to achieve the desired results and none of the different approaches are right or wrong. This is ideal when trying to integrate multiple existing technologies and/or products together when they are providing the same or very similar __**Function**__. Therefore, a key aspect of the Functional Programming methodology is the decomposition of the domain problem space (i.e., DIDOs) into a set of well defined, deterministic functions, in other words, the same set of inputs always produce the same set of outputs regardless of when it is run or the the order the functions are run in. | The [[dido:public:ra:xapend:xapend.a_glossary:f:functionalprogramming]] methodology focuses on results, not the process. Therefore, there can be many different ways to achieve the desired results and none of the different approaches are right or wrong. This is ideal when trying to integrate multiple existing technologies and/or products together when they are providing the same or very similar __**Function**__. Therefore, a key aspect of the Functional Programming methodology is the decomposition of the domain problem space (i.e., DIDOs) into a set of well defined, deterministic functions, in other words, the same set of inputs always produce the same set of outputs regardless of when it is run or the the order the functions are run in. | ||
| - | The Functions are self contained and do not create any side effects or depend on any side effects. Simplistically it means that there is no interaction with external data from within the function. This is very similar to the mathematical definition of a function which uses relational expressions and recursion to do perform the calculations. It does not support iteration like loop statements and conditional statements like If-Else. The data that is passed into the function is immutable (it can not be changed).(( | + | The Functions are self contained and do not create any side effects or depend on any side effects. Simplistically it means that there is no interaction with external data from within the function. This is very similar to the mathematical definition of a function which uses relational expressions and recursion to do perform the calculations. It does not support iteration like loop statements and conditional statements like If-Else. The data that is passed into the function is [[dido:public:ra:xapend:xapend.a_glossary:i:immutable|immutable]] (it can not be changed).(( |
| Guru99, | Guru99, | ||
| Accessed: 13 April 2021, | Accessed: 13 April 2021, | ||
| Line 10: | Line 10: | ||
| )) | )) | ||
| - | Some examples of Functional Programming Languages are: | + | Some examples of Functional [[dido:public:ra:xapend:xapend.a_glossary:p:programlang|Programming Languages]] are: |
| * Clean | * Clean | ||
| Line 19: | Line 19: | ||
| * Make | * Make | ||
| * Mathematica | * Mathematica | ||
| - | * ML/OCaml Lisp / Scheme | + | * ML/OCaml [[dido:public:ra:xapend:xapend.a_glossary:l:lisp]] / Scheme |
| * Scala | * Scala | ||
| * SML | * SML | ||
| Line 28: | Line 28: | ||
| <figure funcproglang> | <figure funcproglang> | ||
| - | {{ dido:public:s_cli:05_contents:02_basics:screen_shot_2021-04-12_at_10.44.36_pm.png?600 |}} | + | {{ dido:public:s_cli:05_contents:01_prt:02_basics:screen_shot_2021-04-12_at_10.44.36_pm.png?600 |}} |
| <caption>Function Programming - Data Flows</caption> | <caption>Function Programming - Data Flows</caption> | ||
| </figure> | </figure> | ||
| - | The DIDO Command Line Interface (DIDO-CL) is a hybrid of [[dido:public:ra:xapend:xapend.a_glossary:f:functionallanguage]] and a [[dido:public:ra:xapend:xapend.a_glossary:p:procedurallanguage]]. The Functional aspects are built around operations that are similar to mathematical functions. For example, the summation of a column of numbers, the insertion, update or deletion of data into a RDBMS. In Functional languages the action comes first and the the thing the action is to be applied to: | + | The DIDO [[dido:public:ra:xapend:xapend.a_glossary:c:cli|Command Line Interface]] (DIDO-CL) is a hybrid of [[dido:public:ra:xapend:xapend.a_glossary:f:functionallanguage]] and a [[dido:public:ra:xapend:xapend.a_glossary:p:procedurallanguage]]. The Functional aspects are built around operations that are similar to mathematical functions. For example, the summation of a column of numbers, the insertion, update or deletion of data into a RDBMS. In Functional languages the action comes first and the the thing the action is to be applied to: |