chore: Switch to this repository from predecessor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Glen Whitney 2021-01-30 15:37:53 -08:00
parent 9ecfa63f58
commit 7b00b01856
23 changed files with 733 additions and 32 deletions

View file

@ -1,18 +1,40 @@
# fostr Language Specification
# The fostr programming language
## Using Statix for multi-file analysis
I don't really like to write code, but I do like the things that coding can
build for me: accounting systems for non-profits I care about, spreadsheets
that have a reasonable calculation language for cell contents, geometric
visualizations that really help to understand three (and maybe even four!)
dimensions.
By default the project is configured to analyze all files of your language in
isolation -- single-file analysis. It is also possible to configure the project
such that all files are analyzed together, and files can refer to each other --
multi-file analysis.
So I embarked on this project to see if I could produce as comfortable a
language as possible to work in, given that I inevitably will be doing a
bunch of coding. The language will be
organized around (unary) ++f++unctions, (binary) ++o++perators, and
(nullary) ++str++eams, hence the name "fostr".
To enable multi-file analysis, do the following:
1. Uncomment the `(multifile)` option in `editor/Analysis.esv`
2. Uncomment the multi-file definition, and comment the single-file version, of
`editor-analyze` in `trans/analysis.str`.
Other guiding principles:
NB. When working in an IDE such as Eclipse, it is necessary to _restart the IDE_
after switching from single-file to multi-file analysis or vice versa. Failure to
do so will result in exceptions during analysis.
* Maximize signal to noise ratio in code, which means minimizing the number
of symbols that have to be there just for the syntax; reducing punctuation;
seeking brief syntax that is not too terse; etc.
* Since code is always structurally indented anyway, make use of that and
don't repeat information that's in the whitespace. This principle meshes
well with the previous one, and if whitespace significance is baked into
the language design from the ground up, it can be kept both effective and
natural.
* Code uses functions all the time. So needless to say, functions should be
first-class entities that are exceptionally easy to create, pass around,
etc.
* And true to the name, operators and streams should be just as easy to handle.
* Try to keep the constructs available as simple to reason about as possible,
and practical to use. So side effects are OK, and it should be clear when
they occur and in what order. And if possible, fostr will consist **only**
of expressions, no other syntactic constructs. Everything has a value.
<!-- /md -->
Like just about every other language, this documentation begins with a
[whirlwind tour](http::/studioinfinity.org/fostr/basic).