Skip to content

Claude's pains #263

Description

@mitchpaulus

Pain points (for you to fix)

  1. Missing-comma error message is misleading. { "a": 1 "b": 2 } (no comma) reports Expected a string or literal after ':' pointing at the value after the colon, not "missing comma between entries." Cost me the most time. Compounding it: the Dictionary section of mshell.md only shows single-key literals ({ "key": 1 }); the multi-key-with-commas form only appears incidentally in the Type System section. A two-key example in the Dictionary section would fix this.
  2. :type? collides with the type keyword. Bareword getters silently fail on reserved words — @att :type? gives the same misleading Expected a string or literal after ':'. I had to use :"type"?. Maybe allow keywords as bareword getter keys, or emit a clearer "reserved word — quote the key" message.
  3. as casts are unchecked, and JSON numbers are the trap. I cast a field to size: int, the type-checker trusted it, but parseJson returns JSON numbers as Float — so size was 8169.0 at runtime. Then $"...{@size}..." failed with did not evaluate to a stringable value: float interpolation isn't allowed even though int interpolation is, and str/round work fine. Two rough edges there: (a) as gives false confidence, and (b) inconsistent interpolation rules between int and float.
  4. Named-shape list cast looks buggy. […] as [Att] (where type Att = {…}) failed with cannot cast [{…}] to [Att({…})] — the two shapes printed identically. Casting to the equivalent anonymous shape [{…}] worked. Named shapes in list casts seem broken (or the error needs to explain what actually differs).
  5. No writeFileBytes / no len on bytes. Minor, but writing an HTTP body to disk pushed me toward utf8Str (fine for ASCII CSV, wrong for real binary). A binary file-write and a byte-length builtin would round things out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions