cours/sources/zotero/ProgrammingParadigms.md
Oscar Plaisant 3305799e49 update
2024-03-29 13:56:47 +01:00

56 lines
3.3 KiB
Markdown

---
zotero-key: XUWRH447g5383243
zt-attachments:
- "139"
citekey: ProgrammingParadigms
---
up:: [[zotero literature notes]]
link:: [Zotero](zotero://select/groups/5383243/items/XUWRH447) [attachment](file:///Users/oscarplaisant/Zotero/storage/LQGLTH3D/paradigms.html)
#pkm #zotero
> [!cite] [Programming Paradigms](zotero://select/groups/5383243/items/XUWRH447) - [Page ](zotero://open-pdf/groups/5383243/items/LQGLTH3D?annotation=QVDN27WM)
> Control flow in imperative programming is explicit: commands show how the computation takes place, step by step. Each step affects the global state of the
> computation.
>
> > [!note] Notes
> > impératif :
> >
> > - flot de contrôle explicite: explication pas-à-pas de ce qui doit être fait
> > - chaque pas affecte l'état global du calcul
> ^QVDN27WMaLQGLTH3Dg5383243
> [!cite] [Programming Paradigms](zotero://select/groups/5383243/items/XUWRH447) - [Page ](zotero://open-pdf/groups/5383243/items/LQGLTH3D?annotation=SW38ETVU)
> Structured programming is a kind of imperative programming where control flow is defined by nested loops, conditionals, and subroutines, rather than via gotos. Variables are generally local to blocks (have lexical scope).
>
> > [!note] Notes
> > Programmation structurée:
> > - structures de contrôle plutôt que `goto`
> > - variables généralement locales à un block
> ^SW38ETVUaLQGLTH3Dg5383243
> [!cite] [Programming Paradigms](zotero://select/groups/5383243/items/XUWRH447) - [Page ](zotero://open-pdf/groups/5383243/items/LQGLTH3D?annotation=KRIHCS5Q)
> OOP is based on the sending of messages to objects. Objects respond to messages by performing operations, generally called methods. Messages can have arguments. A society of objects, each with their own local memory and own set of operations has a different feel than the monolithic processor and single shared memory feel of non object oriented languages.
>
> > [!note] Notes
> > OOP : basé sur l'envoi de messages à des objets.
> ^KRIHCS5QaLQGLTH3Dg5383243
> [!cite] [Programming Paradigms](zotero://select/groups/5383243/items/XUWRH447) - [Page ](zotero://open-pdf/groups/5383243/items/LQGLTH3D?annotation=3SBD24AE)
> Control flow in declarative programming is implicit: the programmer states only what the result should look like,
> not how to obtain it.
>
> > [!note] Notes
> > déclaratif :
> > le flot de contrôle est implicite.
> > on déclare ce que le résultat doit être plutôt que comment l'obtenir.
> ^3SBD24AEaLQGLTH3Dg5383243
> [!cite] [Programming Paradigms](zotero://select/groups/5383243/items/XUWRH447) - [Page ](zotero://open-pdf/groups/5383243/items/LQGLTH3D?annotation=8L7P34B2)
> In functional programming, control flow is expressed by combining function calls, rather than by assigning values to variables:
> ^8L7P34B2aLQGLTH3Dg5383243
> [!cite] [Programming Paradigms](zotero://select/groups/5383243/items/XUWRH447) - [Page ](zotero://open-pdf/groups/5383243/items/LQGLTH3D?annotation=JRBMX3NW)
> Logic programming and constraint programming are two paradigms in which programs are built by setting up relations that specify facts and inference rules, and asking whether or not something is true (i.e. specifying a goal.) Unification and backtracking to find solutions (i.e.. satisfy goals) takes place automatically.
> ^JRBMX3NWaLQGLTH3Dg5383243