On Wed, 22 Jun 2022 at 22:52, Martin Di Paola email@example.com wrote:
Perhaps this is the real focus to analyze. The PEP suggests that x.compute() does something *fundamentally* different from just executing the intermediate expressions.
Hang on, did the PEP change? The version I saw didn't have a compute() method, deferred objects were just evaluated when they were referenced.
There's a *huge* difference (in my opinion) between auto-executing deferred expressions, and a syntax for creating *objects* that can be asked to calculate their value. And yes, the latter is extremely close to being nothing more than "a shorter and more composable form of zero-arg lambda", so it needs to be justifiable in comparison to zero-arg lambda (which is why I'm more interested in the composability aspect, building an AST by combining delayed expressions into larger ones).