aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 37ea5ae1ace708985742caf142341b225bd97f04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# SimpleShell (working title)

* SimpleShell is meant to be a programming language to use in place of shell
  languages (POSIX sh, Bash, ...).
* SimpleShell compiles to POSIX sh, where the output is supposed to be
  human-readable.
* The syntax is de facto a mixture of sh, C and Haskell.


## Variables

* Variables are local to their function or procedure; there are no (nested)
  variable scopes.
* All variables have static types.  Same for function and procedure
  signatures.


## Functions

* Functions are pure; they compute a single value from a list of arguments.
* Compare pure Haskell functions.


## Procedures

* Procedures are similar to POSIX sh functions.
* Procedures take a list of arguments, and return a pair of
  exit code and return value.
* Procedures may receive data from stdin and write data to stdout and stderr.