Zest: syntax

submited by
Style Pass
2024-04-18 17:30:11

Popular advice for designing a language is to focus on semantics and worry about syntax later. So it might seem ill-advised to write about syntax before writing about semantics. But a) I think syntax design is underrated - it has a huge impact on the subjective feel of working with a language, and b) it's hard to write about semantics without first explaining the syntax.

Familiarity and easy skimming are somewhat in tension, because algol-family languages use each symbol for a wide range of different roles.

I'd like to make these categories more thematically aligned but that often conflicts with muscle-memory from other languages. I've mostly ended up with fairly sensible categories without introducing too much novelty, except for the ambiguity between field access and decimal points which was too ingrained in my muscle memory.

I've been convinced that it's valuable to allow arbitrary non-utf8 byte-strings using integer escapes but I haven't decided on the syntax yet. (The default string type would still be utf8.)

Leave a Comment
Related Posts