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

Binding occurence of regions and syntactic sugar with region #812

Open
phischu opened this issue Feb 3, 2025 · 1 comment
Open

Binding occurence of regions and syntactic sugar with region #812

phischu opened this issue Feb 3, 2025 · 1 comment
Labels
feature New feature or request requires-design

Comments

@phischu
Copy link
Collaborator

phischu commented Feb 3, 2025

Since the language construct region r { ... } has a binding occurrence for r, I would find it more consistent to write region { r => ...}.

Moreover, I would like to have with syntactic sugar for regions: with region r; ... should translate to region { r => ... }.

@jiribenes
Copy link
Contributor

jiribenes commented Feb 3, 2025

I think it would make sense to do this, but I forsee a problem.

If you'd want both at the same time and if we were to be consistent with how we treat other computations, then:

  1. the introduction form would have to be region { {r} => ... }, and
  2. the with version would have to be with def r = region; ....

EDIT: It does have an upside, region then needn't be a keyword anymore :^)

@phischu phischu added the feature New feature or request label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request requires-design
Projects
None yet
Development

No branches or pull requests

2 participants