Skip to content

Implement array and slice value semantics #27

Description

@itsfuad

Goal

Finish owned dynamic-array operations and non-owning slice views while keeping mutation on projection/place lowering.

Current Model

  • [N]T is fixed inline array storage.
  • []T is owned dynamic-array storage and is move-only.
  • &[]T is a shared slice view.
  • &mut []T is a mutable non-resizing slice view.
  • Slice views are reference forms; there is no standalone [T] slice type.
  • Slice sources may be fixed arrays or dynamic arrays; slicing creates a view, not ownership.
  • @expr produces rawptr; &expr and &mut expr create safe references.
  • Ranges use .. for exclusive and ..= for inclusive bounds.

Progress

Remaining Work

Validation

  • Parser, typechecker, HIR, MIR, and LLVM tests for construction, slicing, indexing, mutation, and bounds behavior.
  • Positive and negative x_test fixtures.
  • Runnable dynamic-array and slice-view smoke programs.
  • Full capped Go test suite, vet, bundled compiler build, and diff checks.

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

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions