Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we remove shorthand group syntax? #13

Open
whitfin opened this issue May 9, 2019 · 2 comments
Open

Should we remove shorthand group syntax? #13

whitfin opened this issue May 9, 2019 · 2 comments
Labels
discuss This issue needs design discussion

Comments

@whitfin
Copy link
Contributor

whitfin commented May 9, 2019

The existing implementation allows this:

{
  "groups": [
    "field"
  ]
}

The inference here is that we're doing a string-based grouping. Does it make syntax to special case this? I'm not sure if it's that necessary, and it makes the parsing a little more complicated. I propose we strip it out for now and maybe put it back later if we change our minds.

@whitfin whitfin added the discuss This issue needs design discussion label May 9, 2019
@whitfin
Copy link
Contributor Author

whitfin commented May 9, 2019

Thinking this out; maybe we could actually keep this shorthand but replace it with type:field as a string, such as:

{
  "groups": [
    "string:field"
  ]
}

This extends it for other field types, not just strings.

@vasil9v
Copy link
Contributor

vasil9v commented May 10, 2019

IMHO, the original shorthand (just the field name that implies "type": "string") is a keeper. I do also like the "fieldname:type" as well, but i'm willing to give that up more readily than the former if things in the parser are getting too complicated. so in summary i rank the following scenarios from most to least desirable:

have both shorthands
have only the fieldname shorthand
have only the field:type shorthand
have no shorthands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss This issue needs design discussion
Projects
None yet
Development

No branches or pull requests

2 participants