[records] Ancillary fields
Doug Lea
dl at cs.oswego.edu
Sun Apr 22 12:29:39 UTC 2018
On 04/18/2018 01:58 PM, Brian Goetz wrote:
> Seeing no dissent on the claim that the essential use case for ancillary
> fields is caching derived properties,
No dissent, but there is a small leap from here to your proposal,
that addresses only derived initial local properties. Which may be OK.
More broadly, these cases fall under uses of Memoization
(https://en.wikipedia.org/wiki/Memoization) in which caches are
never evicted.
And in turn monotonic predicates (that never become false once set true)
and/or their ancillary data. But short of other mutable monotonic data
(that are non-decreasing wrt some ordering).
The case of initial local properties is common, and may be deserving
of syntax support to increase chances of correct implementation.
But I'm still bothered by lack of a story about any of the other cases.
Maybe the "story" is a tutorial rather than further syntax though.
-Doug
More information about the amber-spec-observers
mailing list