This commit is contained in:
Miloslav Ciz 2024-01-26 16:34:06 +01:00
parent b00889ffc8
commit a6d69e3445
13 changed files with 50 additions and 18 deletions

View file

@ -1,6 +1,6 @@
# Paradigm
Paradigm (from Greek *paradeigma*, "pattern", "example") of a [programming languages](programming_language.md) means the very basic concepts that are used as a basis for performing computation in that language. Among popular paradigms are e.g. the [imperative](imperative.md), [object oriented](oop.md) and [functional](functional.md), but there are many more; we may see every paradigm as a set of basic ideas and mathematical models (e.g. [models of computation](model_of_computation.md)) that form the foundation of how the language works; these are typically additionally also accompanied by kind of "philosophy"/mindset/recommendations that will likely be used by the programmer who uses the language. Just to be clear, paradigm does NOT encompass other than purely technical aspects of performing computation (i.e. it does NOT include e.g. political, artistic or other ideas such as "eco-friendly language", "joke language" etc.). Just as e.g. music genres, paradigms are greatly fuzzy, have different definitions, flavors and are often combined; sometimes it's unclear how to classify paradigms (if one strictly falls under another etc.) or even if something is or isn't a paradigm.
Paradigm (from Greek *paradeigma*, "pattern", "example") of a [programming language](programming_language.md) means the very basic concepts that are used as a basis for performing computation in that language. Among popular paradigms are e.g. the [imperative](imperative.md), [object oriented](oop.md) and [functional](functional.md), but there are many more; we may see every paradigm as a set of basic ideas and mathematical models (e.g. [models of computation](model_of_computation.md)) that form the foundation of how the language works; these are typically additionally also accompanied by kind of "philosophy"/mindset/recommendations that will likely be used by the programmer who uses the language. Just to be clear, paradigm does NOT encompass other than purely technical aspects of performing computation (i.e. it does NOT include e.g. political, artistic or other ideas such as "eco-friendly language", "joke language" etc.). Just as e.g. music genres, paradigms are greatly fuzzy, have different definitions, flavors and are often combined; sometimes it's unclear how to classify paradigms (if one strictly falls under another etc.) or even if something is or isn't a paradigm.
For example the [functional](functional.md) paradigm is built on top of [lambda calculus](lambda_calculus.md) (one of many possible mathematical systems that can be used to perform general calculations) which performs calculations by combining pure mathematical [functions](function.md) -- this then shapes the language so that a programmer will mostly be writing mathematical functions in it, AND this also usually comes with the natural "philosophy" of subsequently viewing everything as a function, even such things as loops or [numbers](number.md) themselves. In contrast [object oriented](oop.md) (OOP) paradigm tries to solve problems by constructing a network of intercommunicating "objects" and so in OOP we tend to see most things as objects.