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
- Statically typed language
- Object-oriented structures (Models)
- Support for various data types including custom Models
- Output handling with a built-in Outflow function
- Standard library available for mathematical functions and array length
- Various iteration methods available through a single loop function
- Assignment using ~ operator
- Variables follow snake_case convention
- Usage of frozen keyword for constant variables
- A special easter egg feature
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
Bryan Ardon-Contreras
Davis Banks
Edward Hallim
Henry Benso