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

Remove many abbreviations #4363

Merged
merged 13 commits into from
Mar 16, 2025
Merged

Conversation

giacomocavalieri
Copy link
Member

@giacomocavalieri giacomocavalieri commented Mar 16, 2025

This PR removes the use of various abbreviations:

  • r#gen was renamed to this to follow an already existing convention in the codebase
  • elems was renamed everywhere to elements
  • when iterating over elements the loop variable is now consistently called element instead of elem or e
  • there was one stray occurrence of typ that I renamed to type_ to follow the already existing convention
  • retrn was renamed to return_ to be consistent with the choice of adding an underscore after names that would otherwise be Rust keywords
  • t has been renamed to type_ when it references a type
  • I've renamed a couple other single-letter lambda arguments to use more descriptive names
  • I did quite a bit of renaming for the arguments of the functions is ast_folder, previously a lot of those were single letter names

@GearsDatapacks
Copy link
Member

I think there is at least one place where we use retrn as an abbreviation for return. Maybe we should rename that to return_?

@giacomocavalieri
Copy link
Member Author

Oh yeah great idea, I'll rename that as well

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@lpil lpil merged commit 8b61f12 into gleam-lang:main Mar 16, 2025
12 checks passed
@giacomocavalieri giacomocavalieri deleted the no-abbreviations branch March 17, 2025 08:11
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

Successfully merging this pull request may close these issues.

3 participants