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

Drop the fn keyword for function declarations? #6

Open
osa1 opened this issue Jun 24, 2024 · 0 comments
Open

Drop the fn keyword for function declarations? #6

osa1 opened this issue Jun 24, 2024 · 0 comments

Comments

@osa1
Copy link
Contributor

osa1 commented Jun 24, 2024

Dropping the fn keyword causes no ambiguities in the grammar. It's easy to parse (both for humans and the compiler) because all the other declarations start with a keyword (currently: type, trait).

Adding constant declarations should also not be a problem, we can decide whether we're parsing a function or a constant based on the left paren.

The fn keyword would still be used for lambdas.

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