DEV Community

Ngwang Shalom
Ngwang Shalom

Posted on Edited on

I built a programming language where you can't lose a cent: a 5-minute tour of Quill

Quill is an open-source language for backends, business software and automation. It's built around three ideas: intent is clear, failures are explicit, and correctness is part of the code. Here's a five-
minute tour.

Install

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Ngwangshalom/Quill/releases/latest/download/quill-installer.sh | sh


## Start a whole app

Enter fullscreen mode Exit fullscreen mode


bash
quill new shop app
cd shop
quill run server.quill


That's a small events company: bookings checked against a type, prices with VAT, three payments that add up to the cent, and an AI assistant. `quill test` runs its tests.

## Data that reads like a sentence

Enter fullscreen mode Exit fullscreen mode


plaintext
say count of students where score >= 50
say average score of students
say get name of students sorted by highest score


## Money that never loses a cent

Enter fullscreen mode Exit fullscreen mode


plaintext
say split 100 USD into 3 -- 33.34 USD, 33.33 USD, 33.33 USD


`100 USD + 20 EUR` doesn't run. Quill says it won't mix currencies, and suggests `convert 20 EUR to USD at 0.92`, at the rate you were given.

## Failures you can't forget

Enter fullscreen mode Exit fullscreen mode


plaintext
fn charge(amount: USD) -> text
fails Declined
...

receipt = charge(5000 USD)
on Declined -> "declined"


Leave out `on Declined` and Quill won't run the program. It tells you which failure you forgot.

## Errors that teach

Enter fullscreen mode Exit fullscreen mode


plaintext
say total + "hello"
^^^^^^^^^^^^^^^
You're adding money in USD (total) and Text ("hello").
Add or subtract two amounts in the same currency, like 100 USD + 50 USD.


## Join in

Quill is early and open source (Apache 2.0). If you like languages, compilers, docs, or editor tooling, there's plenty to do:

- {% embed Repo: https://github.com/Ngwangshalom/Quill %}
- {% embed Book: https://ngwangshalom.github.io/Quill/ %}
- Learn it with exercises: `quill new practice learn`
Enter fullscreen mode Exit fullscreen mode


`

Top comments (0)