Re: [community-group] Token name - reserved words (#61)

FYI: There's been some [good debate](https://github.com/design-tokens/community-group/pull/89#discussion_r780904504) over on PR #89 which I had started with the intent of updating the spec to use the `metadata` approach outlined above.

The main concern is the inconsistency between groups (where "special" properties are nested under `metadata`) and tokens (where they are top-level properties) that this would introduce. The worry is it might make the file format a little confusing for folks to learn or read.

The format editors discussed this at our last meeting and agreed this needs some more thought before we decide how to proceed.

In light of that, I'm starting to wonder if it's worth revisiting the `$` prefix approach I proposed earlier in this thread. Rather than having several reserved _words_, we'd instead have a reserved _prefix_. Tokens and groups would be forbidden from using that prefix for their names. If we choose a special character like `$` then hopefully that restriction on naming won't be too bad for most teams. This approach is:

- **Future proof:** Future spec versions can add as many new `$...` properties as they want and there's no risk of naming clashes with token and group names
- **Consistent:** Assuming we apply the same prefix to all token properties, then groups and tokens share a familiar syntax.

What do you think? Is this perhaps a better alternative to the `.metadata` route we've been going down?

-- 
GitHub Notification of comment by c1rrus
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/61#issuecomment-1011544318 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 12 January 2022 23:26:17 UTC