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

Bind, hoist and parens #205

Open
EduardoRFS opened this issue Dec 28, 2023 · 0 comments
Open

Bind, hoist and parens #205

EduardoRFS opened this issue Dec 28, 2023 · 0 comments

Comments

@EduardoRFS
Copy link
Contributor

On the current design for the MVP, both bind and hoist can be wrapped in parens allowing for both (x = 1); K and (x : A); K this makes sense as ideally adding parens should not change meaning just precedence.

But if there is a desire to support direct effects without a unit, this is not ideal as (print "a" : ()); K can be both thought as a pattern and as a side effect.

Alternatively both bind and hoist should be forced to have no parens such as x = 1; K and x : A; K, this would mean that (x : A); K is different from x : A; K, which is likely not intuitive.

An advantage of also allowing the parens and forcing unit for side effects, is that let could in principle omit parens.

f x =
  y = x + 1;
  y + 2;
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