fn main() { //comments are C-style /* nested comments /* are cool */ */ } @annotations are with @- // variable expressions var a: I32 = 20 const b: String = 20 there(); can(); be(); multiple(); statements(); per_line(); //string interpolation const yolo = "I have ${a + b} people in my house" // let expressions ??? not sure if I want this let a = 10, b = 20, c = 30 in a + b + c //list literal const q = [1,2,3,4] //lambda literal q.map({|item| item * 100 }) fn yolo(a: MyType, b: YourType): ReturnType { if a == 20 { return "early" } var sex = 20 sex } for { //infinite loop } //iteration over a variable for i <- [1..1000] { } //return type is return type of block //while loop for a != 3 || fuckTard() { break } //return type is return type of block //monadic decomposition for { a <- maybeInt(); s <- foo() } return { a + s } //return type is Monad // let statements too!! for (a = 20 b = fuck) { a + b } // pattern-matching match { Some(a) => { }, None => { }, } //syntax is, I guess, for , where is a bool, or a // type level alises typealias = #maybe thsi should be 'alias'? /* what if type A = B meant that you could had to create A's with A(B), but when you used A's the interface was exactly like B's? maybe introduce a 'newtype' keyword for this */ //declaring types of all stripes type MyData = { a: i32, b: String } type MyType = MyType type Option = None | Some(a) type Signal = Absence | SimplePresence(i32) | ComplexPresence {a: i32, b: MyCustomData} //traits trait Bashable { } trait Luggable { fn lug(self, a: Option) } } // lambdas // ruby-style not rust-style const a: X -> Y -> Z = {|x,y| }