From 0dab4e8d11d17e1d7e377540df25dc3fcb6445ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com>
Date: Wed, 4 May 2022 14:37:12 +0200
Subject: [PATCH] Explain why not using a standard scripting language such as
 Python

---
 doc/userdoc.org | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/doc/userdoc.org b/doc/userdoc.org
index dce8ecc83..81e44250a 100644
--- a/doc/userdoc.org
+++ b/doc/userdoc.org
@@ -249,7 +249,7 @@ solution to all problems. However, it offers some advantages.
   the code to check its meaning.
 
 
-**** ~pugs~ language purpose
+***** ~pugs~ language purpose
 
 ~pugs~ language is used to assemble ~C++~ tools which are well
 tested. These tools should ideally be small pieces of ~C++~ code that
@@ -264,7 +264,7 @@ the context is quite easily checked.
 Finally it aims at simplifying the definition of new methods since
 common utilities are available directly in scripts.
 
-**** The framework: divide and conquer
+***** The framework: divide and conquer
 
 ~pugs~ is a research oriented software, thus generally the user is also
 a developer. If this paragraph is indeed more dedicated to the
@@ -321,14 +321,26 @@ writing of new methods.
     others to check if it could benefit to the others to determine if
     it should integrate rapidly or not the main development branch.
 
-**** TODO Why not python or any other scripting language?
-
-- provide a language close to the application: a DSL is made for that.
-- general purpose languages offer to much freedom: it is not easy to
-  protect data
-- do not deal with the difficulty of parallelism within the
-  scripting language
-- python is ugly
+***** Why not python or any other scripting language?
+
+As it was already pointed out above, general purpose languages offer
+to much freedom: it is not easy to protect data. For instance in the
+~pugs~ DSL, non basic variables are constant (see paragraph
+[[variable-types]]). It is important since its prevent the user to modify
+data in an inconsistent way. Also, one must keep in mind that
+constraining the expressiveness is actually a strength. As said
+before, one can warranty coherence of the data, perform calculations
+without paying attention to the parallelism aspects,... Observe that
+it is not a limitation: if the DSL's field of application needs to be
+extended, it is always possible. But these extensions should never
+break the rule that a DSL must not become a general purpose language.
+
+Providing a language close to the application (or here in particular
+close to the Mathematics language) reduces the gap between the
+application and its expression (code): Domain Specific Languages are
+made for that.
+
+Finally, python is ugly.
 
 *** TODO A high-level language
 
-- 
GitLab