-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(compiler)!: Change ->
to =>
in type signatures
#1855
feat(compiler)!: Change ->
to =>
in type signatures
#1855
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
I don't fully understand the code in the lever hack that checks the data types but what I did understand looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Oscar's happy with the parsing, this looks great.
One question, can we use the formatter or provide a utility to help people bulk change their code to the new style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two comments:
- I would love to see some stress tests/weird cases which should not parse (
let f = (foo, bar) => Number
) in the test suite - Extremely minor concern: just want to double-check other Core Team members (cc @ospencer and @phated especially) are cool with this possibly introducing some potential confusion for new users (e.g.
let lexer : (stream) => List<Token>
might look to a new user likestream
is supposed to be the name of the function argument and not a placeholder type).
I feel like the issue of the confusion was already there before the arrow change. |
Yes, true, but the |
@peblair A potential point of relief is that if the user is using VSCode or possibly another editor we may support integration with in the future, the LSP & syntax highlighting may allow for a form of distinguishability between parameter names and placeholder types. For example with the code
VSCode should highlight/format
which can be useful for figuring out what is going on. Not perfect, but it's something at least |
@peblair I added some parsing tests to |
Going to merge this, we can always add more tests later 🎉 |
6d88859
to
086640c
Compare
Closes #1179 (supersedes)