Goal
Define foundation-level str runtime semantics.
Settled semantics
str is an owned immutable string value.
&str is borrowed view used when passing or inspecting existing text.
"..." produces str; c"..." produces C string value.
b'x' produces byte; 'x' produces character value.
len(&value) reports UTF-8 byte length.
as_bytes(&value) returns zero-copy borrowed byte view.
as_chars(&value) returns owned decoded character array.
String ranges return borrowed &str views with ordered byte bounds and UTF-8 boundary checks.
Direct string indexing and borrowed-string comparison remain rejected until separately specified.
Delivered
Owned str checking, literals, printing, carrier ABI, allocator-aware cleanup, and direct raw carrier addresses.
Canonical len, as_bytes, and as_chars free functions with pipe adaptation.
Borrowed string ranges, UTF-8 boundary traps, and temporary-borrow escape diagnostics.
Positive, negative, runtime, 32-bit, and 64-bit regression coverage.
PRs Fix string ABI and place traversal duplication #68 , Fix 32-bit ABI and intrinsic conformance #69 , Complete end-to-end compiler review remediation #71 , Fix cloning of open-ended default ranges #72 , and Add free builtins and pipe call support #77 contain delivered work.
Follow-ups
Foundation contract is complete. Future work stays in linked follow-up issues.
Goal
Define foundation-level
strruntime semantics.Settled semantics
stris an owned immutable string value.&stris borrowed view used when passing or inspecting existing text."..."producesstr;c"..."produces C string value.b'x'produces byte;'x'produces character value.len(&value)reports UTF-8 byte length.as_bytes(&value)returns zero-copy borrowed byte view.as_chars(&value)returns owned decoded character array.&strviews with ordered byte bounds and UTF-8 boundary checks.Delivered
strchecking, literals, printing, carrier ABI, allocator-aware cleanup, and direct raw carrier addresses.len,as_bytes, andas_charsfree functions with pipe adaptation.Follow-ups
Foundation contract is complete. Future work stays in linked follow-up issues.