explained Q-forms in the readme
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
Clyx (pronounced like _clicks_) is a concatenative, stack-oriented, interpreted programming language designed for simplicity, minimalism, and metaprogramming capabilities.
|
||||
|
||||
Clyx aims for maximum portability and can be implemented in any modern runtime environment that supports data structures defined in JSON (numbers, strings, lists and key-value dictionaries). Extra features varying in portability include filesystem support and TCP socket I/O.
|
||||
Clyx aims for maximum portability and can be implemented in any modern runtime environment that supports data structures defined in JSON (numbers, strings, arrays and key-value dictionaries). Extra features varying in portability include filesystem support and TCP socket I/O.
|
||||
|
||||
The core spec of Clyx is mostly stable but the standard library is still a work-in-progress.
|
||||
|
||||
@@ -182,6 +182,10 @@ Forth is good if you are fine with only being able to push integers onto the sta
|
||||
|
||||
While diverging from some "purity" aspects, Clyx is a decent choice for newcomers that want to try out a totally new programming paradigm without investing too much time into fighting the language's quirks.
|
||||
|
||||
### Why are lists called Q-forms in Clyx?
|
||||
|
||||
Idiomatically, lists (as a data structure, as in Python lists or JSON arrays) can only hold data. Q-form is short for "quotation form", which just means that it is a quoted (block-like) sequence that can be treated both as data and as code. Physically, Q-forms are implemented as random-access lists or arrays in 100% cases, but logically, it's important to maintain this distinction that Q-forms can hold program code and lists in general do not. Besides, the term "list" is confusing in general because, apart from the random access lists used to implement Q-forms, it can also refer to linked lists or double-linked lists, which have totally different sets of features and constraints.
|
||||
|
||||
### What do I need to do to create my own Clyx implementation?
|
||||
|
||||
Just port the core interpreter along with the 50 primitive words, stubbing out the words that cannot be supported by the target platform if there are any, so that if a program that e.g. uses `nopen` runs on a non-networked host environment, then the user would get a clear message that an unsupported core primitive word has been encountered and the program has been terminated because of that.
|
||||
|
||||
Reference in New Issue
Block a user