On Wed, 19 Oct 2022 20:37:46 GMT, Nir Lisker <nlis...@openjdk.org> wrote:
>> I like `conditionOn`. > > I actually like `asLongAs` that was mentioned in another comment, but it > looks odd :) > > Lately, as I was reading some unrelated codebases and I came up with > `updateWhile` (or `updateWhen`). The reason is that names like `when` and > `conditionOn`, and even the restricted `if` and `while`, tell me just half > the story. They tell me what happens "when", but not what happens "when not". > The `bindings.When` binding is phrased as "`when` condition `then` A, > `otherwise` B", which is I think it great. This binding is phrased as "`when` > condition", but then what and what otherwise? > > Because the binding updates its value when/while/as long as the condition > holds and *doesn't update when the condition doesn't hold* (it just stays the > same), I think that the phrasing "`update while` condition" (and don't update > while not condition) gives a better description of the functionality. Does `asLongAs` imply recurrent nature? ------------- PR: https://git.openjdk.org/jfx/pull/830