Skip to content

Language change: a bare literal list after 'of' is ALWAYS an argument list (kill the 1-element spread trap) #405

Description

@InauguralPhysicist

Why. The compiler spreads literal list args only at count > 1 (#153), so f of [x] binds the whole 1-element list to the first param — breaking the obvious recursive shape fib of [n - 1] the moment a defaulted param is added. This is an arity-dependent silent-wrong. #355 already shipped the escape hatch (parenthesizing suppresses spread: f of ([x]) passes the literal list whole), so the fix reduces to: spread at EVERY count, one consistent rule teachable in one sentence. Lua's lesson says documented-forever traps are a permanent per-user tax; pre-1.0 with zero external users is the only cheap moment to fix it.

What.

Acceptance. fib of [n - 1] works with a defaulted second param; suite regression tests both forms; consumer sweep clean; frontend differential green against the pinned VM.

Effort: weeks (the change is small; the consumer audit + frontend parity + release coordination is the real cost). Source: 2026-07-04 survey (learnability dimension).

Closes #153

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions