Skip to content
@arolang

ARO Language

The ARO Programming Language

ARO Language

ARO (Action-Result-Object) is a declarative programming language where business logic reads like a requirements document. Every statement follows one pattern:

Action the <Result> from/to/with the <Object>.

No classes. No callbacks. No boilerplate. Just what the system should do.

A REST API in ARO

Define your contract in OpenAPI, then write the handlers:

(createUser: User API) {
    Extract the <user-data> from the <request: body>.
    Create the <user> with <user-data>.
    Store the <user> into the <user-repository>.
    Emit a <UserCreated: event> with <user>.
    Return a <Created: status> with <user>.
}

That's a complete endpoint. The runtime handles validation, error responses, and HTTP plumbing.

React to Everything

Feature sets are triggered by events, not called directly:

(* HTTP route handlers match OpenAPI operationIds *)
(listUsers: User API) {
    Retrieve the <users> from the <user-repository>.
    Return an <OK: status> with <users>.
}

(* Domain events trigger side effects *)
(Send Welcome Email: UserCreated Handler) {
    Extract the <email> from the <event: email>.
    Send the <welcome-email> to the <email>.
    Return an <OK: status> for the <notification>.
}

(* Repository observers react to data changes *)
(Audit Log: user-repository Observer) {
    Extract the <change> from the <event: change>.
    Log <change> to the <console>.
    Return an <OK: status> for the <audit>.
}

Data Pipelines

Filter, aggregate, and transform collections in plain language:

Create the <orders> with [
    {id: 1, amount: 500, status: "active"},
    {id: 2, amount: 75, status: "cancelled"},
    {id: 3, amount: 300, status: "active"}
].

Filter the <active-orders> from the <orders> where <status> is "active".
Reduce the <total: Float> from the <active-orders> with sum(<amount>).

Happy Path Only

ARO code contains only the success case. If a user can't be retrieved, the runtime responds automatically:

Can not retrieve the user from the user-repository where id = 530

No try/catch. No error types. The code is the error message.

Quick Start

brew tap arolang/aro
brew install aro
aro run ./MyApp

Links

Pinned Loading

  1. aro aro Public

    ARO is a declarative language for specifying business features in a human-readable format that can be compiled and executed. Features are expressed as Action-Result-Object statements.

    Swift 10

Repositories

Showing 10 of 20 repositories

Top languages

Loading…

Most used topics

Loading…