This commit is contained in:
2026-07-17 18:53:34 +02:00
parent 97f1c06057
commit 866e28adb8
13 changed files with 468 additions and 215 deletions
+3 -6
View File
@@ -9,18 +9,15 @@ odin build . -out:build/brolang
./build/prototype
```
Programs may receive the system I/O capability explicitly. Readers and writers
pair that implementation with a stream; `main func() ...` remains valid.
Programs may receive the system I/O capability explicitly. Standard-stream
helpers bind the provider, handle, and callback; `main func() ...` remains valid.
```bro
io :: import "@std/io"
process :: import "@std/process"
main func(init process.Init) void {
io.print(io.Writer {
impl = init.io,
stream = .stdout,
}, "hello {s} {d}\n", {"bro", 37}) catch |_| {
io.print(io.stdout(init.io), "hello {s} {d}\n", {"bro", 37}) catch |_| {
return
}
}