[records] Ancillary fields
brian.goetz at oracle.com
Sun Apr 22 13:15:29 UTC 2018
Yes, you caught me :)
The lazy fields story made sense to me here because (a) it makes enough sense on its own and (b) it seems just enough to avoid the most common cases of “dumb records just aren’t enough”. But it it is, to a degeee, a patch.
Sent from my MacBook Wheel
> On Apr 22, 2018, at 2:29 PM, Doug Lea <dl at cs.oswego.edu> wrote:
>> 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.
More information about the amber-spec-experts