Skip to content

Commit

Permalink
docs(README): Update some information and improve code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mertyildiran committed Sep 18, 2020
1 parent 122810a commit 9539c2c
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,20 @@
### Unique Features

- There are no control structures. (no `if..else`, no `switch..case`) Decision making only possible on function returns:
```
func myFunc(num a, num b)
// your code
end { x > 0 : f1(x), default : f2(x) }
```ruby
num def add(num x, num y)
num z = x + y
end {
z == 8 : f1(),
z > 10 : f2(),
default : f3()
}
```
- A single unit test is enough to have 100% coverage on functions, always.
- Warns you about untested functions in the executed program.
- Chaos language is not object-oriented. So everything is done by functions and data types.
- Immutability everywhere.
- No `while` or `when` keywords. Loops are predetermined. There is also `INFINITE` keyword to achieve infinite loops if it's necessary.
- No `while` or `when` keywords. Loops are predetermined. Infinite loops can only be achievable through the `INFINITE` keyword.
- Single source of errors and unique exit codes for each one of them. So the errors are catchable by other programs.
- Language's itself forces you to write less error-prone code.
- Say goodbye to dependency conflicts with [Occultist](https://occultist.io/) dependency manager.
Expand All @@ -74,29 +78,29 @@
Install the requirements:
```
```shell
make requirements
```
Compile the interpreter:
```
```shell
make
```
Install the `chaos` binary system-wide:
```
```shell
make install
```
## Usage
### Interactive Shell
```
```shell
$ chaos
Chaos Language 0.0.1-alpha (Aug 16 2020 21:56:00)
Chaos Language 0.0.1-alpha (Sep 18 2020 03:03:40)
GCC version: 9.3.0 on linux
Turn chaos into magic!
Expand All @@ -108,16 +112,16 @@ kaos> exit
### Program File as Command-line Argument
```
$ chaos dev.kaos
```shell
$ chaos hello.kaos
hello world
```
## Uninstallation
You can uninstall the `chaos` binary and its C headers with:
```
```shell
make uninstall
```
Expand Down

0 comments on commit 9539c2c

Please sign in to comment.