uniform function call syntax

This commit is contained in:
2026-06-06 22:29:25 +02:00
parent 3a53cd4f32
commit 3098d0abf9
34 changed files with 488 additions and 398 deletions

View File

@@ -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!")