From c73afe1878bddfee0e0cea64a7941e8bc5564e97 Mon Sep 17 00:00:00 2001 From: Pekka Laiho Date: Tue, 8 Dec 2020 09:13:34 +0700 Subject: [PATCH] update readme with goals and non-goals --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 216ddb4..568a5fe 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,22 @@ MadLisp is a [Lisp](https://en.wikipedia.org/wiki/Lisp_%28programming_language%2 ## Goals -The goal of the project was to learn about the internals of programming languages and to build a simple language suitable for scripting and similar use cases. +* REPL environment where the user can interactively experiment with the language. Suitable for executing pieces of code one by one and examining the internal state of the system. +* Minimal safeguards or restrictions as to what can be done. Breaking things or using the language in unexpected ways should be part of the fun. +* Performance does not need to match commercial-grade languages, but needs to be fast enough for real-world programs and uses cases. +* Suitable to be used as a scripting language in Linux shell scripts and similar environments. +* Suitable to be used as an embedded scripting language inside another PHP application. +* Clear and intuitive error messages. This is important for pleasant user experience. +* Provide a library with commonly used features such as HTTP requests, JSON processing and SQL database support. +* Provide a clean [interface](src/Lib/ILib.php) for extending the language with your own functions defined in PHP. +* Provide a safe-mode where access to the file system and other external I/O is restricted. +* Provide a debug mode which shows what is happening inside the code evaluation. +* Loosely respect the Lisp legacy with things like naming conventions but do not be constrained by it. + +## Non-goals + +* Ability to call arbitrary PHP functions directly. The language should have control over which PHP functions can be called and how. +* Namespaces or similar mechanisms. The global namespace is a feature, not a bug! Use a prefix for your function names if this becomes a problem. ## Features