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

Functional interface overhaul #16

Closed
Speiger opened this issue Apr 23, 2022 · 0 comments
Closed

Functional interface overhaul #16

Speiger opened this issue Apr 23, 2022 · 0 comments
Labels
enhancement New feature or request Fixed Bug is fixed but not released yet
Milestone

Comments

@Speiger
Copy link
Owner

Speiger commented Apr 23, 2022

Since this is technically a recreation of FastUtil, this means I also copied some of its flaws.
The functional interface part of Primitive Collections is kinda a mess.

When I copied and redesigned it to be less clutter (I removed a lot of functions FastUtil had) I still left the messy design in it.
To give a example.

Primitive Collections adds Consumers, but not ObjectConsumers since java has them already, but IntConsumers exist and extend of javas IntConsumer.
Also imports of Javas Consumer is a special case that needs to be accounted for.
Functions duplicate for some cases because there exists 2 consumers.

And Function.class has the same problem where it has already duplicates and the function also renames the function you are going to call or delegates it. Just for the Map Interface which extends it.

For this the whole Functional interfaces kinda need a major overhaul.

This only breaks code if you specifically use said functional interfaces directly. Not even in lambdas or method references.
And maps are free from that too.

While I don't have right now no real solution for that. This needs to be addressed.
Preferably with the next minor release. (Since I treat them as Major releases until 1.0)

@Speiger Speiger added the enhancement New feature or request label Apr 23, 2022
@Speiger Speiger added this to the 0.7.0 milestone Apr 23, 2022
@Speiger Speiger added the Fixed Bug is fixed but not released yet label Dec 15, 2022
@Speiger Speiger closed this as completed Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Fixed Bug is fixed but not released yet
Projects
None yet
Development

No branches or pull requests

1 participant