
On Sun, Oct 31, 2021 at 9:24 PM Sven R. Kunze <srkunze@mail.de> wrote:
Actually, the "defer:"-syntax is really readable and searchable compared to the cryptic comparison operator used in the proposal. Just thinking towards "googleability".
Google's smarter than that. I've searched for symbols before and found plenty of good results. For instance, I can search for information about the @ sign before a function, or independently, for a @ b, and get information about decorators or matrix multiplication. We don't need words - especially not words that will break people's code - in order for people to find information.
Furthermore, the concept is even more general than parameter definition of functions and methods. I guess a lot of people have already tryied to implement this kind of object various times before (proxy objects, transparent futures etc.)
It also would fit the current semantics of default parameters of Python.
It's a completely different feature, and has very different consequences. It is not a complete replacement for default expressions. Notably, it can't refer to anything in the caller's context, without breaking a lot of things about Python's namespacing model. ChrisA