-
Notifications
You must be signed in to change notification settings - Fork 108
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
Use < > brackets for effects #787
Comments
I'd be in favor of that. I think the reason I went with |
Oh yeah, I forgot about the angle bracket in |
For reference, Unison uses curly braces as well, https://www.unison-lang.org/learn/language-reference/ability-declaration/. You may want to add Dex to the list here: https://en.wikipedia.org/wiki/Effect_system :D |
Oh, I guess I need to look at real Koka code, I was basing my assertion on the old 2016 Koka paper |
I think we can't do what Koka does today, because that's too similar to function application. Koka uses parens, which makes their current syntax unambiguous. But I've been wanting to switch us to angle brackets for a while, so let's do it! |
With the introduction of using
{}
in type signatures to implicitly quantify over variables, there are now 3 distinct uses of curly braces that all show up in type signatures:The effect syntax also uses vertical bars
|
, which make their syntax confusingly close to that of variants. For example, here are two different type signatures in the prelude:One to do with effects:
One to do with variants:
So I suggest we use angle brackets
< >
for effects. They aren't used at all in the current syntax. They would also give a more explicit nod to Koka for developing some of these ideas.The text was updated successfully, but these errors were encountered: