~sjm/role-up#9: 
would it be better to build the repl first and simply back it with a full JSON representation?

This would avoid the need to design syntax and build a parser upfront. If I still felt the format was valuable after the repl was built, then I could still build the language out - but if the JSON covered the use case and tooling avoided the need for ever editing the file directly then I could stick with JSON or use a SQLite backend, or some other backing format.

The JSON representation would still be a series of events, of course. Think

[
  { action: "set property", property: "name", value: "jim" },
  { action: "set property", property: "xp", value: 8 },
  { action: "update property", property: "xp", update: { type: "add", value: 1 } }
]

This still requires some smaller amount of parsing within the repl, but could start with the CLI first to skip over that, then we'd already have a library for making those changes to a backing store and generating output, and could build up over time. The repl may be a good route for making the language both usable step by step while being useful and without having to start whole-hog.

Status
REPORTED
Submitter
~sjm
Assigned to
No-one
Submitted
10 months ago
Updated
10 months ago
Labels
No labels applied.