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

Disable shortcuts #91

Closed
nsbgn opened this issue May 11, 2022 · 1 comment
Closed

Disable shortcuts #91

nsbgn opened this issue May 11, 2022 · 1 comment

Comments

@nsbgn
Copy link
Contributor

nsbgn commented May 11, 2022

We have a shortcut notation for constraints, in which we can use constraints x[...] as simply their reference x. Actually instating constraints is a side effect.

I think this should be disabled for the release of 0.2, because I'm not sure it is a good idea (it probably conflicts with #86, and also see #85) and I don't want to remove features post-release.

The single way of adding constraints is via the >> operator. Should using a constraint as a reference be deemed a good idea later, it can always be implemented by making a Constraint a Type itself, i.e. give it an .instance() method.

@nsbgn nsbgn added this to the Version 0.2: RDF support milestone May 11, 2022
@nsbgn
Copy link
Contributor Author

nsbgn commented May 16, 2022

In the end, with 0f9feaa the notation was changed so that x[...] only is for adding constraints - it is not a constraint in itself. This makes this issue less important, since we don't blur the boundaries between constraint and type. We can put the constraint anywhere and return the type on which it was put, even if we might later decide to change the structure of constraints, since we can always bubble the constraints up to wherever they need to be. That is why we don't need to bother with parentheses: (x ** x) [x < A] is the same as x ** x [x < A].

(I hope these ramblings sound coherent.)

@nsbgn nsbgn closed this as completed May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant