River Programming Language

Story of River

In the tranquil embrace of nature, rivers flow in a manner such that ecosystems flourish where it goes. This concept of a peaceful flow gave life to the concept we call River. River is a statically typed language designed to put the users first. We have created River to become a programming language where the developer feels calm expressing their programming desires.

Feature Overview

Easter Egg

Find the Easter egg! Can you uncover it?

Examples


// hello world
text hello_word ~ "hello_world";
outflow(hello_world);
            

// basic loops
num y ~ 0;
loop() >
    if(y == 3) >
        dry;
    >
    y +~ 1;
>
            

// tasks and iterables
num[] our_array ~ [1,2,3];
task sum_array_elements(our_array) >
    num sum ~ 0;
    loop(num n in our_array) >
        sum +~ n;
    >
    return sum;
>
            

// models
model Dog > constructor > num age, text name >
    task updateAge(num q) >
        age +~ q;
    >
    task getAge() >
        return age;
    >
>

Dog d ~ Dog(0, "pop");
d.updateAge(2);
d.getAge();
            

// frozen variables
frozen text language_name = "river";
language_name ~ "bang"; // would throw an error
            

// standard library
num[] our_array ~ [1,2,3];
length ~ len(our_array);
num s ~ sin(π);
num c ~ cos(π);
num e ~ exp(π);
num b ~ bytes(🤓);
            

Developers

image of Bryan Ardon-Contreras

Bryan Ardon-Contreras

image of Davis Banks

Davis Banks

image of Edward Hallim

Edward Hallim

image of Henry Benso

Henry Benso

Bryan Ardon-Contreras

Nicholas Lee

image of Maika Tran

Maika Tran