Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
alpacaaa committed Sep 8, 2023
1 parent bbfc84e commit dabf1ca
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

![Borgo sits between Go and Rust](https://raw.githubusercontent.com/borgo-lang/borgo-lang.github.io/main/borgo.jpg)

---

![build](https://github.com/borgo-lang/borgo/actions/workflows/ci.yml/badge.svg)

I want a language for writing applications that is more expressive than Go but
less complex than Rust.

Expand All @@ -14,7 +18,7 @@ existing Go packages.

Borgo syntax is similar to Rust, with optional semi-colons.

## Tutorial
# Tutorial

Check out the **[online playground](https://borgo-lang.github.io/)** for a tour
of the language.
Expand All @@ -25,9 +29,9 @@ You can also take a look at test files for working Borgo code:
- [infer-expr.md](compiler/test/infer-expr.md)
- [infer-file.md](compiler/test/infer-file.md)

## Features
# Features

**Algebraic data types and pattern matching**
## Algebraic data types and pattern matching

```rust
use fmt
Expand All @@ -45,7 +49,9 @@ let msg = match state {
}
```

**`Option<T>` instad of `nil`**
---

## `Option<T>` instad of `nil`

```rust
// import packages from Go stdlib
Expand All @@ -60,7 +66,9 @@ match key {
}
```

**`Result<T, E>` instad of multiple return values**
---

## `Result<T, E>` instad of multiple return values

```rust
use fmt
Expand All @@ -76,7 +84,9 @@ fn makeRequest() -> Result<int, error> {
}
```

**Error handling with `?` operator**
---

## Error handling with `?` operator

```rust
use fmt
Expand All @@ -103,6 +113,8 @@ fn copyFile(src: string, dst: string) -> Result<(), error> {
}
```

---

## Guessing game example

Small game from the Rust book, implemented in Borgo.
Expand Down

0 comments on commit dabf1ca

Please sign in to comment.