8000 GitHub - w1jtoo/Rat
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

w1jtoo/Rat

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
    Consol
6186
e.Readley

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0