One
One copied to clipboard
🩱 THE `One` syntax: Idea, Improve 1️⃣
Hi there; Welcome here. please share what you think and all of your idea.
// not required - default: package main
fn test {
_ 1
_ 2, 4, 6, 8
_ 5+8
_ (2 + 15 * ( 25 - 13 ) / 1 - 4) + 10 / 2
}
fn main {
_ 1
_ 110
_ 123
}
i32 main {
ret 10
}
test {
}
main {
test()
}
type struct my {
i32 a
i32 b
}
main {
my a
a.a = 10
a.b = 20
}
type enum my {
MY_A
MY_B
MY_C
}
main {
my a = MY_A
_ a
}
type Point {
i64 x
i64 y
}
Point Point+(Point left, Point right) {
Point p
p.x = left.x + right.x
p.y = left.y + right.y
ret p
}
i32 main {
Point p
p.x = 50
p.y = 80
p = p+p
__ p.x
__ p.y
return 1 // 1 = okay, default
}
a image from Amir (Go Language):

a image from Amir (Dart language):
