On 7/17/2020 7:23 AM, emmanuel.coir...@caissedesdepots.fr wrote:
Hello everyone,

I'm sorry if my proposition has already being said, or even withdrawn,
but I think that capture variables shouldn't be as implicit as they
are now.

I've looked at the PEP very quickly, jumping on the examples to have
a taste and an idea of what was going here. I saw a new kind of control
structure based on structural pattern matching (pattern based on
classes or compositions of classes to make it short). A very good
idea, emphasized by Tobias Kohn ("Another take on PEP 622") is that
pattern matching eases the writting of code based on matching such
structures, and that capturing values stored inside of these
structures at the match time really eases the writting of the code
associated with this match.

A major points of Kohn's post is that 'case' is analogous to 'def' and match lists are analogous to parameter lists. In parameter lists, untagged simple names ('parameter names') are binding targets. Therefore, untagged simple names in match lists, let us call them 'match names' should be also. I elaborated on this in my response to Tobias.

--
Terry Jan Reedy
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/L62PAUPNVPZ47SNSMWOW2O3WRTZ3CAHI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to