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

Single value sets #8

Closed
labra opened this issue May 29, 2016 · 2 comments
Closed

Single value sets #8

labra opened this issue May 29, 2016 · 2 comments
Milestone

Comments

@labra
Copy link
Contributor

labra commented May 29, 2016

A very common pattern is to define a value set with a single element. For example:

:SpanishProduct {
 :country [:Spain]
}

Although this syntax is ok, one of the most common errors is to try to define the previous shape as:

:SpanishProduct {
 :country :Spain
}

which is not what is intended (that declares that values should belong to a type :Spain.

Having some syntactic sugar for single value shapes would make this feature less error-prone. One possibility would be the equals sign.

:SpanishProduct {
 :country = :Spain
}
@ericprud
Copy link
Contributor

ericprud commented May 29, 2016

my temptation is to save "=" for defaults, which don't have any

The current semantics but could be useful for form-building etc.

@ericprud ericprud added this to the 2.1 milestone Mar 1, 2017
@ericprud ericprud modified the milestones: 2.1, 2.next Nov 23, 2018
@andrawaag
Copy link
Contributor

We close this due to inactivity, @labra feel free to reopen if still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants