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

Alternative keywords #139

Closed
JorisBlanken opened this issue Apr 11, 2019 · 1 comment
Closed

Alternative keywords #139

JorisBlanken opened this issue Apr 11, 2019 · 1 comment

Comments

@JorisBlanken
Copy link

Hello,

This is an extension of the discussion I started in Issue 138.

Using the syntax in the linked discussion I propose the when keyword can be eliminated, also I'd like to propose to change case to match instead.
When statements can instead simply be delimited by a semi-colon, which can be handled optionally as it currently is in JavaScript.

Example:

const factorial = n => match (n) {
    0 -> 1;
    n -> n * factorial(n - 1);
}

I'd like to hear other's thoughts on this.

Thanks,
Joris

@JorisBlanken
Copy link
Author

Noticed other issues cover this

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