lib: refresh I/O architecture guidance

This commit is contained in:
2026-08-09 18:19:53 +09:00
parent 0aaba1a254
commit ca2cadeb41

View File

@@ -59,12 +59,12 @@ Modules with intentional divergence:
import-free time leaf. This is what lets `errors` import `os` (for
`os.errno` / `os.strerror`) without a cycle, mirroring Hare's
`sys ← errors`, `sys ← io`.
- `lib/io` keeps the ww-specific `stream` struct (vtable of fn
pointers, no closures, no methods). The Hare `io::handle` family
needs language features we don't have yet.
- `lib/bufio` and `lib/sort` will be redesigned to Hare's
`scanner` / `cmpfunc` shapes; the present minimal forms are
placeholders until then.
- `lib/io` keeps the ww-specific intrusive vtable stream (function
pointers, no closures or methods) and collapses Hare's extra stream
pointer layer. Its `handle` is the shipped `(file | stream)` sum.
- `lib/bufio` ships Hare-shaped buffered-stream and scanner subsets;
the exact supported operations and ownership rules are documented in
its source header. `lib/sort` still awaits its Hare `cmpfunc` shape.
- `lib/time` and `lib/math` ship only what callers need today;
they're not aiming for parity yet.