Re: [community-group] Group format (#105)

Coming at this from the perspective of working on a parser for this spec (and have built parsers for OpenAPI previously), IMO this doesn’t make parsing any easier on its own. So if this were pursued it should be for other benefits.

The reason this doesn’t help parsing is that `value` isn’t unique to groups; it’s also found on all tokens. Further, it’s impossible to infer the type from any `value`, as composite types will have object values.

If we wanted to make parsing groups easier, I’d expect taking the JSON Schema approach of enforcing a unique `type` on every node (in this case, `type: "group"`). I think that’s been proposed before and it was decided against (unless I’m mistaken)? The `value` would help in tandem with `type`, but again, `type: "group"` would be doing the heavy lifting being the unique identifier that says “this node is a group and could not be anything else.”

It’s worth pointing out adding `value` would open up namespacing to allow more names, so in that regard this seems like an alternate proposal to #72.

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


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

Received on Tuesday, 18 January 2022 16:00:35 UTC