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

[Kernel] Proposal to change naming convention for getter method #3814

Open
ebyhr opened this issue Oct 28, 2024 · 2 comments
Open

[Kernel] Proposal to change naming convention for getter method #3814

ebyhr opened this issue Oct 28, 2024 · 2 comments

Comments

@ebyhr
Copy link
Contributor

ebyhr commented Oct 28, 2024

Currently, kernel uses get prefix for getter method, but it will lead to inconsistent naming once we start using record of JDK 16.

I propose changing the convention to avoid get prefix as much as possible like Iceberg project.
https://iceberg.apache.org/contribute/#method-naming

  1. Avoid get in method names, unless an object must be a Java bean.
  • In most cases, replace get with a more specific verb that describes what is happening in the method, like find or fetch.
  • If there isn't a more specific verb or the method is a getter, omit get because it isn't helpful to readers and makes method names longer.

Relates to https://delta-users.slack.com/archives/C04TRPG3LHZ/p1729770917226719

@ebyhr
Copy link
Contributor Author

ebyhr commented Oct 28, 2024

cc: @vkorukanti

@vkorukanti
Copy link
Collaborator

Thanks, @ebyhr, for creating this issue. The proposed convention makes sense to me.

One qn I have is for the setX (for mutable objects). Is this remain the same or is there a convention?

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

2 participants