On Tue, 18 Apr 2023 00:04:27 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:
> Just took a quick look. > > Ideally, we would not split the world into subscriptions and listeners. > Adding a return type to `addListener` and `removeListener` is source > compatible, but not binary. Is this something that we strictly can't do? Is > the disruption factor too high? I would say it's not really source-compatible, as the change would be forced on every `Observable` or `ObservableValue` implementation. I'm also not too sure whether this would actually be a sensible API: why have a `removeListener` method at all, when `addListener` returns a subscription? The distinction between `addListener/removeListener` and `subscribe` seems to make more sense to me, and can be retrofitted without any new implementation requirements. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1069#issuecomment-1512258452