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

Ability to hint proper parameter names for functional interfaces #54

Open
TheMode opened this issue Jul 10, 2021 · 0 comments
Open

Ability to hint proper parameter names for functional interfaces #54

TheMode opened this issue Jul 10, 2021 · 0 comments

Comments

@TheMode
Copy link

TheMode commented Jul 10, 2021

I am (re)-using multiple common functional interfaces in my code, and the parameter names sometimes do not properly match the intent. For example DoubleUnaryOperator taking a double generically named operand.

I believe there could be an annotation hinting the IDE into using our own name

// What is currently suggested
Vec.ZERO.withX(operand -> operand * 5);
// With hint
Vec.ZERO.withX(x -> x * 5);

// Similar example using UnaryOperator
// What is currently suggested
itemBuilder.meta(itemMetaBuilder -> itemMetaBuilder);
// With hint
itemBuilder.meta(metaBuilder -> metaBuilder);

The alternative would be creating my own interfaces, which feels a bit unnecessary.

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