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

OperatorVisitor: qualify index param names #767

Merged
merged 1 commit into from Sep 16, 2022

Conversation

nagisa
Copy link
Contributor

@nagisa nagisa commented Sep 16, 2022

This is intended to make it easier for implementers of this trait to figure what is what (admittedly index doesn’t say much when there are all kinds of indexable lists, and some entities deal with indices into multiple lists), especially if they’re using something like RLS’ auto-implement all methods or just reading the documentation.

With type_index and tag_index these parameters become self-documenting.

@nagisa
Copy link
Contributor Author

nagisa commented Sep 16, 2022

Oh, it is going to affect the definitions of the Operand type too…

Well, I think it is still worth trying to make this change tbh, so I’ll adjust.

@nagisa nagisa changed the title [NFC] OperatorVisitor: qualify index param names OperatorVisitor: qualify index param names Sep 16, 2022
This is intended to make it easier for implementers of this trait to
figure what is what (admittedly `index` doesn’t say much when there are
all kinds of indexable lists, and some entities deal with indices into
multiple lists), especially if they’re using something like RLS’
auto-implement all methods or just reading the documentation.

With `type_index` and `tag_index` these parameters become
self-documenting.
Copy link
Contributor

@Robbepop Robbepop left a comment

Choose a reason for hiding this comment

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

Thanks a lot for these improvements. In the past I often was confused about this as well.

@alexcrichton alexcrichton merged commit 6dee72f into bytecodealliance:main Sep 16, 2022
@alexcrichton
Copy link
Member

Agreed, thank you for these improvements!

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.

None yet

3 participants