Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

w1jtoo/Rat

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rat

Rat is a high-level functional programming language with compilation to Microsoft Intermediate Language (MSIL).

Main fature is chaining methods with | and & operatiors. For example:

let div a, b = if b != 0 a / b else Err

print (toString & (div | 0) (...))

Same rust example code:

fn div(a: f32, b: f32) -> Result<f32> {
    match b {
        0 => Err(),
        _ => a / b
    }
fn main() {
    println!("{}", div(...).or_else(0));
    }
}

Rat 0.1 features

Features are needed to bootstrapping.

Fucntion

let foo a, b = a + b

Operations

To numerical types:

  • binary: +, *, /, %
  • unary: -
  • ternary: if condition then_branch else else_branch

To functuins:

  • | - TODO description
  • & - TODO description

Extern block:

Extern DotnetMath:
    Math.Cos
    Console.Abs

Extern DotnetMath:
    Console.Writeline
    Console.Readley

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.