This commit is contained in:
Oscar Plaisant
2024-03-30 03:09:29 +01:00
parent 48474c47a1
commit 2fa94d91d2
12 changed files with 99 additions and 14 deletions

View File

@@ -30,7 +30,14 @@ up:: [[paradigme de programmation]]
3. implémentation d'une solution **dans le langage lui-même**
4. la simplicité est conservée / retrouvée (on évite les modifications envahissantes)
> [!cite] [Programming Paradigms for Dummies: What Every Programmer Should Know](zotero://select/groups/5383243/items/673TMQRT) - [Page 17](zotero://open-pdf/groups/5383243/items/P4L4LCJZ?page=9&annotation=6ZNVVQGI)
> [!cite]+ [The paradigms of programming](zotero://select/groups/5383243/items/Y8NDFJ8W) - [Page 3](zotero://open-pdf/groups/5383243/items/WWITR642?page=3&annotation=QWLFQ9JA)
> After solving a challenging problem, ! solve it again from scratch, retracing only the insight of the earlier solution. I repeat this until the solution is as clear and direct as I can hope for. Then I look for a general rule for attacking similar problems, that would have led me to approach the given problem in the most efficient way the first time. Often, such a rule is of permanent value.
>
> > [!note] Notes
> > définition originale de l'extension créative
> ^QWLFQ9JAaWWITR642g5383243p3
> [!cite]- [Programming Paradigms for Dummies: What Every Programmer Should Know](zotero://select/groups/5383243/items/673TMQRT) - [Page 17](zotero://open-pdf/groups/5383243/items/P4L4LCJZ?page=9&annotation=6ZNVVQGI)
> The common theme in these three scenarios (and many others!) is that we need to do pervasive (nonlocal) modifications of the program in order to handle a new concept. If the need for pervasive modifications manifests itself, we can take this as a sign that there is a new concept waiting to be discovered. By adding this concept to the language we no longer need these pervasive modifications and we recover the simplicity of the program.
>
> > [!note] Notes
@@ -39,7 +46,7 @@ up:: [[paradigme de programmation]]
> > ajouter ce concept au langage => éviter les modifications envahissantes => retrouver la simplicité
> ^6ZNVVQGIaP4L4LCJZg5383243p9
## Exemples de modifications envahissantes et solutions
# Exemples
> [!cite] [Programming Paradigms for Dummies: What Every Programmer Should Know](zotero://select/groups/5383243/items/673TMQRT) - [Page 17](zotero://open-pdf/groups/5383243/items/P4L4LCJZ?page=9&annotation=VAZ8DBMA)
> If we need to model updatable memory, that is, entities that remember and update their past, then we will have to add two arguments to all function calls relative to that entity. The arguments represent the input and output values of the memory. This is unwieldy and it is also not modular because the memory travels throughout the whole program. All this clumsiness is unnecessary if we add one concept to the language: named state.