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 Functions Utility Methods? #1797

Closed
benjchristensen opened this issue Oct 24, 2014 · 5 comments
Closed

Remove Functions Utility Methods? #1797

benjchristensen opened this issue Oct 24, 2014 · 5 comments
Milestone

Comments

@benjchristensen
Copy link
Member

We have unnecessary methods sitting in the Functions class. Should we remove them?

These set a precedent for including utility methods, but generally we don't want them in RxJava core.

    public static <T> Func1<T, Boolean> not(Func1<? super T, Boolean> predicate) {
    public static <T> Func1<? super T, Boolean> alwaysTrue() {
    public static <T> Func1<? super T, Boolean> alwaysFalse() {
    public static <T> Func1<T, T> identity() {
    public static <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, R> NullFunction<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, R> returnNull() {

@headinthebox and I think we should remove them. Anyone have a good reason to keep them?

@benjchristensen benjchristensen added this to the 1.0 milestone Oct 24, 2014
This was referenced Oct 24, 2014
@davidmoten
Copy link
Collaborator

I use them, I'd vote for keeping them as support for < Java 8 (my work codebase is still at Java 7 and will stay that way till next year sometime). I'm not very interested in returnNull.

@benjchristensen
Copy link
Member Author

This has nothing to do with Java 8 vs 7. It's about RxJava not including non-essential functionality. The fact that we accrued a few random utility functions is not reason enough to keep them and sets precedent for adding more (which is generally not wanted). So why should these be kept? They are rarely used and trivial to implant in an application if needed.

@davidmoten
Copy link
Collaborator

I checked my codebase and I use very little so I'm happy for them to be removed.

@benjchristensen
Copy link
Member Author

Thanks for the feedback.

@yogurtearl
Copy link

I was using this... but I suppose it is easy enough to roll you own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants