RFR: JDK-8304439: Subscription based listeners [v2]
Michael Strauß
mstrauss at openjdk.org
Tue Apr 18 00:11:57 UTC 2023
On Tue, 18 Apr 2023 00:04:27 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
> There is still some use for the standard listener methods; there are some rare cases where having the `Observable` or `ObservableValue` parameter is actually useful. I'd prefer to drop this parameter from the subscription variants though as it is rarely useful and makes the lambda's / method refs awkward to use. For methods refs your method must have an unused `Observable` or `ObservableValue` parameter (and sometimes these methods are not under your control, like `ObservableValue::setValue`, or `SelectionModel::select`)
This will get better in the future, when Java gets to have unnamed parameters. I quite dislike the idea of having different and incompatible functional interfaces in the core observable API.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1069#issuecomment-1512262018
More information about the openjfx-dev
mailing list