Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Kat Marchán 🐈
@zkat@toot.cat  ·  activity timestamp 2 months ago

language design challenge: If you were to support unquoted paths in a language like #KDL, how would you do it in a way that didn't have massive footguns?

See https://github.com/kdl-org/kdl/discussions/494 and send us your answer there! Maybe there's still a way :)

  • Copy link
  • Flag this post
  • Block
tef
@tef@mastodon.social replied  ·  activity timestamp 2 months ago
@zkat the last time i considered bareword strings in a json knock off, i resigned myself to only allowing it for keys and not values

after doing a bunch of go, i'm starting to think "ok but all barewords must be pre declared before parsing"

ie if i'm parsing into a struct, then any field can be a bareword key, no luck for maps though

  • Copy link
  • Flag this comment
  • Block
Jan Lehnardt :couchdb:
@janl@narrativ.es replied  ·  activity timestamp 2 months ago
@zkat “I'm trying not to regret unquoted strings” — my tiny toldyouso moment :)

Proposal looks great as far as the resulting language looks like generally. Hope you get to sort out the edge cases and migration.

  • Copy link
  • Flag this comment
  • Block
Kat Marchán 🐈
@zkat@toot.cat replied  ·  activity timestamp 2 months ago
@janl I do not remotely regret unquoted strings actually. The thing I regret is the comment syntax
  • Copy link
  • Flag this comment
  • Block
Kat Marchán 🐈
@zkat@toot.cat replied  ·  activity timestamp 2 months ago
@janl data point: I've been writing a lot of KDL lately for my own projects, by hand, and the unquoted strings make sure a huge ergonomic difference
  • Copy link
  • Flag this comment
  • Block
Jan Lehnardt :couchdb:
@janl@narrativ.es replied  ·  activity timestamp 2 months ago
@zkat I’m not arguing, I’m just taking a tiny tiiiiiiny win :)
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.13 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login