Skip to content

Implement for loops after model basics #31

Description

@itsfuad

Goal

Add for support after array/slice/optional basics are stable.

Scope

  • Start with arrays and slices.
  • Add iterator protocol only after next / optional return semantics are usable.
  • Avoid dynamic interface dispatch for normal array/slice loops.
  • Allow dynamic dispatch only when source type is already interface/dynamic.

Validation

  • Parser/typechecker/HIR/MIR/backend tests.
  • Runnable x_test for for i in xs, for i, v in xs, and infinite for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanguage-modelPeeper language model, ownership, pointer, optional, array/slice work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions