uniform function call syntax
This commit is contained in:
10
README.md
10
README.md
@@ -5,19 +5,19 @@ A very cool language
|
||||
## Features
|
||||
* Clean indentation-based syntax
|
||||
* Compiles to x86_64 Assembly
|
||||
* Growing [standard library](https://git.ton1.dev/toni/zern/src/branch/main/src/std)
|
||||
* Produces tiny static executables (11KB for `hello.zr`)
|
||||
* No libc required!
|
||||
* Has type inference, variadics, dynamic arrays, hashmaps, DNS resolver, etc.
|
||||
* Produces tiny static executables (11KB for `hello.zr`)
|
||||
* Has type inference, [UFCS](https://en.wikipedia.org/wiki/Uniform_function_call_syntax), variadics, dynamic arrays, hashmaps, DNS resolver, etc.
|
||||
* Growing [standard library](https://git.ton1.dev/toni/zern/src/branch/main/src/std)
|
||||
|
||||
## Syntax
|
||||
```rust
|
||||
func main[] : i64
|
||||
answer := math.abs(os.urandom_i64()) % 100
|
||||
answer := os.urandom_i64()->abs() % 100
|
||||
|
||||
while true
|
||||
io.println("Guess a number: ")
|
||||
guess := str.parse_i64(io.read_line())
|
||||
guess := io.read_line()->parse_i64()
|
||||
|
||||
if guess == answer
|
||||
io.println("You win!")
|
||||
|
||||
Reference in New Issue
Block a user