aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: a884dfa7524ba345fe791a6e99f724ff3be7eaee (plain) (blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# `prc`, a compiler for the Prose programming language

> **IMPORTANT NOTE**: Prose is still under heavy development. It is therefore
> not ready for production yet.

Prose is a new and small programming language that aims for readability
and native interoperability with C. Its syntax, while a bit distant from
ALGOL-like languages like C, should still be readable to most programmers.

Most remarkably, Prose avoids sigils such as `{}`, `$` or any other kind of
symbol, in favour of simple and readable English-like statements.
The only exception is `*`, which is used for comments:

A hello world example:

```
* this is a comment
public function main
linkage
    status word
procedure returning status
    display "hello world"
    set status to 0
```

As opposed to other programming languages such as Python, Prose follows
free-form syntax, and therefore the same program can be written in any format:

```
public function main linkage status word procedure returning status display "hello world" set status to 0
```

Prose follows the C ABI and also inherits its type system:

```
public function main
imports "cstd"
linkage
    status cint
    argc cint
    argv pointer to array of etc byte
storage
    fd cint
procedure using argc argv returning status
    display "argc=" argc ", argv=" argv
    call socket using AF_INET SOCK_STREAM 0 returning fd
    display "fd=" fd
    call close using fd
    set status to 0
```

## LICENSE

```
    prc, a compiler for the Prose programming language.
    Copyright (C) 2026  Xavier Del Campo Romero

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
```