Chuck Jazdzewski [G]
05/23/2019, 4:47 PMKey
) if Item
uses a @Pivotal
parameter such as,
fun Item(@Pivotal item: DataItem) {
...
}
then calls to Item
automatically track the value of item
.elizarov
05/23/2019, 4:52 PM@Pivotal
and not @Key
or something like it. The choice of the “pivotal” as the name of the feature seems highly unusual to me:
Pivotal, adjective
1. Of crucial importance in relation to the development or success of something else.
2. Fixed on or as if on a pivot.… and 1st meaning usually springs to mind (pun intended) when reading
@Pivotal
Chuck Jazdzewski [G]
05/23/2019, 4:55 PMelizarov
05/23/2019, 4:59 PMChuck Jazdzewski [G]
05/23/2019, 5:00 PMitem
being for any memoization done by the Item
. An Image
can mark src
as pivotal and it knows that it will never be called with a different src
for the same memoization location in the execution tree. This allows a launch
of the read to be performed that is composition life-cycle aware and be cancelled automatically when the value of src
changes at the call site.Leland Richardson [G]
05/23/2019, 5:00 PMChuck Jazdzewski [G]
05/23/2019, 5:02 PMelizarov
05/23/2019, 5:05 PMKey
, Keyed
, WithKey
, etc for annotation and function names. It is indeed hard, since it has to align with other functions out there that brining some non-visible things into the tree context.@Key
annotation and withKey(key) { ... }
composable function with lower-case letter signifying that it is not really a visual component in any sense (does this distinction make sense? I don’t know)Leland Richardson [G]
05/23/2019, 5:08 PMkeyedBy(...) { ... }
Chuck Jazdzewski [G]
05/23/2019, 5:19 PMLeland Richardson [G]
05/23/2019, 5:21 PM