std.io¶
Accepted
Accepted as a V1 namespace skeleton. IO and printing APIs are deferred.
std.io owns readers, writers, streams, printing APIs, and the standard stream capability vocabulary.
Expected Contents¶
- reader and writer interfaces
- stream abstractions
- standard stream handles such as stdin, stdout, and stderr
- print and println-style helpers
- APIs that connect
std.fmtformatting to output sinks - IO error sets and error-policy helpers
Printing belongs in std, not the prelude. Printing depends on writer, formatting, allocation, and error-policy decisions that are library concerns rather than core language semantics.
Capability Boundary¶
Standard input, output, and error streams are capabilities. Future std.io APIs should model them as explicit handles supplied by the program host, test harness, or caller-owned context record, not as ambient language authority.
Printing helpers should take a writer, stream, or IO capability parameter directly. A future convenience wrapper may choose stdout or stderr from an explicit capability record, but std.io.print must not imply hidden access to process-global stdout.
This follows the ordinary capability rules in Capabilities and Destructuring: IO authority is passed through normal parameters, may be grouped with other capabilities under a field such as io, and remains visible to realtime and sandboxing policy.
V1 Boundary¶
V1 does not accept public reader, writer, stream, print, or println APIs. Full IO and printing design is deferred to CEP-0048: Standard Text and Formatting.