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

Case convention: use snake_case for values #493

Closed
yannham opened this issue Dec 9, 2021 · 0 comments · Fixed by #518
Closed

Case convention: use snake_case for values #493

yannham opened this issue Dec 9, 2021 · 0 comments · Fixed by #518

Comments

@yannham
Copy link
Member

yannham commented Dec 9, 2021

Is your feature request related to a problem? Please describe.
The current informal (not enforced by the parser) case convention is to use camelCase for values and CamelCase for types and contracts.

Describe the solution you'd like
As decided during the standardization meeting, adopt the same convention as Rust: snake_case for values and CamelCase for types/contracts. For now, this means changing the stdlib, examples and tests to reflect this new convention. Enforcing this convention at parsing time is out of scope of this specific issue (and may not even be possible if we merge type and values syntax).

@yannham yannham added this to the first release milestone Dec 9, 2021
mboes added a commit that referenced this issue Dec 28, 2021
This renames all builtins and standard library functions to conform to
a snake case convention, as per decision recorded in #493. This also
adapts examples and tests to this change. All functions have been
renamed the way you'd expect, except the following:

* `fromPred` -> `from_predicate`
* `typeOf` -> `typeof` (like in C)
* `fieldsOf` -> `fields` (the `_of` is redundant for a function)
* `valuesOf` -> `values` (the `_of` is redundant for a function)

Closes #493
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant