2022-08-17 18:16:48 -06:00
|
|
|
# ![ARF](assets/logo.svg)
|
2022-08-08 23:51:56 -06:00
|
|
|
|
|
|
|
The ARF programming language.
|
|
|
|
|
|
|
|
This is still under development and does not compile things yet. Once complete,
|
|
|
|
it will serve as a temporary compiler that will be used to write a new one using
|
|
|
|
the language itself.
|
|
|
|
|
2022-08-09 19:15:49 -06:00
|
|
|
The old repository can be found [here](https://github.com/sashakoshka/arf-old).
|
|
|
|
|
|
|
|
ARF is a low level language with a focus on organization, modularization, and
|
|
|
|
code clarity. Behind it's avant-garde syntax, its basically just a more refined
|
|
|
|
version of C.
|
|
|
|
|
|
|
|
A directory of ARF files is called a module, and modules will compile to object
|
|
|
|
files (one per module) using C as an intermediate language (maybe LLVM IR in the
|
|
|
|
future).
|
|
|
|
|
|
|
|
## Design aspects
|
|
|
|
|
|
|
|
These are some design goals that I have followed/am following:
|
|
|
|
|
|
|
|
- The standard library will be fully optional, and decoupled from the language
|
|
|
|
- The language itself must be extremely simple
|
|
|
|
- Language features must be immutable (no reflection or operator overloading)
|
2022-08-12 18:32:58 -06:00
|
|
|
- Prefer static over dynamic
|
2022-08-09 19:15:49 -06:00
|
|
|
- Data must be immutable by default
|
|
|
|
- Memory not on the stack must be allocated and freed manually
|
|
|
|
- Language syntax must have zero ambiguity
|
2022-08-12 18:32:58 -06:00
|
|
|
- The compiler should not generate new functions or complex logic that the user
|
|
|
|
has not written
|
2022-08-15 15:21:34 -06:00
|
|
|
- One line at a time - the language's syntax should encourage writing code that
|
|
|
|
flows vertically and not horizontally, with minimal nesting
|
2022-08-09 19:15:49 -06:00
|
|
|
|
|
|
|
## Planned features
|
|
|
|
|
|
|
|
- Type definition through inheritence
|
|
|
|
- Struct member functions
|
|
|
|
- Go-style interfaces
|
|
|
|
- Generics
|
|
|
|
- A standard library (that can be dynamically linked)
|
|
|
|
|
2022-08-08 23:51:56 -06:00
|
|
|
## Checklist
|
|
|
|
|
|
|
|
- [X] File reader
|
2022-08-11 17:37:00 -06:00
|
|
|
- [X] File -> tokens
|
2022-08-08 23:51:56 -06:00
|
|
|
- [ ] Tokens -> syntax tree
|
|
|
|
- [ ] Syntax tree -> semantic tree
|
|
|
|
- [ ] Semantic tree -> C -> object file
|
2022-08-09 19:15:49 -06:00
|
|
|
- [ ] Figure out HOW to implement generics
|
|
|
|
- [ ] Create a standard library
|