Re: PEP 642: Constraint Pattern Syntax for Structural Pattern Matching

Re: symbol for lookup
Whatever happened to the proposal of using . as prefix?
If memory serves, the main objection was about it being hard to see, but is it really? We use fixed width fonts for a reason, and there are other places a dot is quite critical (has any php programmer ever mistaken a .= for a = ?) without it's size ever causing issues.
I think . is visible enough while being aesthetically inoffensive. Am i missing some problem or important past objection to it?

Hello,
On Tue, 3 Nov 2020 10:30:22 +0100 Federico Salerno salernof11@gmail.com wrote:
Re: symbol for lookup
Whatever happened to the proposal of using . as prefix?
I guess, the same that happened with the proposals to use "+" as a prefix, or proposals to change sides and use "->" (https://mail.python.org/archives/list/python-dev@python.org/thread/F22RLCDGK...) or ">" to mark variables to be bound.
If memory serves, the main objection was about it being hard to see, but is it really? We use fixed width fonts for a reason, and there are other places a dot is quite critical (has any php programmer ever mistaken a .= for a = ?) without it's size ever causing issues.
I think . is visible enough while being aesthetically inoffensive. Am i missing some problem or important past objection to it?
It's logically rather offensive. Dot is "structural sub-element" operator.
Given things like:
from .foo import bar a.b = 1
something like:
sth = "currently, I'm going to match by this value" match foo: case .sth: print("This looks really weird!")
looks really weird.

On 11/3/20 1:30 AM, Federico Salerno wrote:
Re: symbol for lookup
Whatever happened to the proposal of using . as prefix?
I think . is visible enough while being aesthetically inoffensive. Am i missing some problem or important past objection to it?
Many people think . is not visible enough, myself included.
-- ~Ethan~
participants (3)
-
Ethan Furman
-
Federico Salerno
-
Paul Sokolovsky