Skip to content

Define string runtime semantics #29

Description

@itsfuad

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

Follow-ups

Foundation contract is complete. Future work stays in linked follow-up issues.

Activity

  1. added
    enhancementNew feature or request
    runtime-loweringHIR/MIR/backend runtime lowering work
    language-modelPeeper language model, ownership, pointer, optional, array/slice work
    on Jun 27, 2026
  2. moved this from Todo to In Progress in Peeper Roadmapon Aug 8, 2026
  3. itsfuad commented on Aug 11, 2026

    @itsfuad
    MemberAuthor

    Review/remediation stack is now open:

    Issue remains In Progress. Scope is unchanged: runtime string construction, explicit C/FFI bridge, and any further string contract work remain open.

  4. moved this from In Progress to Done in Peeper Roadmapon Aug 21, 2026
  5. closed this as completedby moving to Done in Peeper Roadmapon Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanguage-modelPeeper language model, ownership, pointer, optional, array/slice workruntime-loweringHIR/MIR/backend runtime lowering work

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions