jOOQ / jOOL

jOOλ - The Missing Parts in Java 8 jOOλ improves the JDK libraries in areas where the Expert Group's focus was elsewhere. It adds tuple support, function support, and a lot of additional functionality around sequential Streams. The JDK 8's main efforts (default methods, lambdas, and the Stream API) were focused around maintaining backwards compatibility and implementing a functional API for parallelism.
http://www.jooq.org/products
Apache License 2.0
2.08k stars 167 forks source link

Remove the deprecated curry methods on Function[N] #274

Open johnmcclean opened 7 years ago

johnmcclean commented 7 years ago

I can submit a PR if you like.

I think one curry() method per Function type that returns a chain of single parameter functions would be useful here instead.

lukaseder commented 7 years ago

I can submit a PR if you like.

Glad you asked. Don't :) Because this code is generated. The real code (generator code) is not in this repository.

The deprecation was introduced with https://github.com/jOOQ/jOOL/issues/216, because the functions don't actually curry, they apply partially.

Do you need curry at your side?

johnmcclean commented 7 years ago

Yeah, I'd like a curry method on them directly. I'm going extend them (to add in useful methods related to the types in cyclops), a curry method would be very useful (could be added in either library) - but the deprecated curry methods will be confusing in that case.

By the way - what do you think of this issue - https://github.com/aol/cyclops-react/issues/422 . Do you think we could add such a match method directly to the Tuples in jOOλ?

lukaseder commented 7 years ago

OK, thanks for the feedback. I guess we can remove them, as jOOλ hasn't reached 1.0 yet.

Hmm, I'd prefer not to put too many things in the Tuple[N] types prematurely. For instance, your suggested match() method lists [N] predicates per tuple. But are you sure those predicates will always operate on only one attribute?

lukaseder commented 7 years ago

Anyway, I think we should discuss a potential new match() method in a new issue...

lukaseder commented 6 years ago

It might still be a bit early to remove the methods. I'll postpone this to the next release.