std¶
Accepted
Accepted for the V1 root namespace policy and minimal declarations; broader root API policy is deferred.
std is the normal standard-library module root. It is available for resolution, but it is not implicitly imported and its declarations are not automatically in scope.
Expected Contents¶
- stable child namespaces such as
std.mem,std.collections,std.hash,std.fmt,std.debug,std.io,std.math,std.sort,std.testing, andstd.text - root-level types only when they are broad standard vocabulary rather than domain-specific APIs
- the canonical
Result(T, E)type for APIs that need to store, aggregate, or pass outcomes as values - no compiler-provided prelude declarations
Result(T, E) belongs at the std root as shared vocabulary for stored or aggregated outcomes. It is not required for ordinary fallible calls because Catalyst error returns provide the core propagation model.
V1 Minimal Declarations¶
V1 accepts this minimal public surface:
pub fn Result(comptime T: Type, comptime E: Error) Type
Result(T, E) reserves the canonical root type-factory spelling. T must be a concrete sized value type. E must be an error-set type, including a closed error set, a closed error-set union, or Error.
V1 does not accept Result constructors, methods, implicit conversions, pattern matching behavior, memory representation, or formatting/debug behavior. Ordinary fallible APIs should continue to use T!E. Richer Result policy is deferred to CEP-0049: Standard Result Policy.
The other accepted V1 declarations are owned by child namespaces:
std.mem:FixedBufferAllocator.std.math:min,max, andclamp.std.testing:assert.
All other root declarations are deferred unless promoted by a later accepted design.