
On Fri, Jun 24, 2022 at 3:50 AM Stephen J. Turnbull < stephenjturnbull@gmail.com> wrote:
That's true in David's proposed semantics, where the runtime does that check. I'm suggesting modified semantics where deferreds can be a proxy object, whose normal reaction to *any* operation (possibly excepting name binding) is
1. check for a memoized value, if not found evaluate its stored code, and memoize the value 2. perform the action on the memoized value
I think I like these semantics better than those my draft proposal. I haven't had a chance to enhance the proto-PEP more in the last few days (other work). But all of these comments are extremely helpful, and I'll have a better version in a few days. Hopefully I can address many of the concerns raised.