Yet another idea for pattern matching syntax
I'm sorry, I've been skipping around the discussion a bit, but I'm fairly certain this suggestion hasn't been proposed yet. It's perhaps a bit too different from what has been proposed thus far but maybe that's exactly what's needed to convince the minds, since as far as I see it most of the parties who have an opinion on marking either assignments or lookups would at this point have changed their mind, if they were going to at all. What about declaring the identifiers that are going to be lookups in advance? Something like: match obj with some_var, something: case x, some_var: # here x binds, but some_var is a lookup I'm just throwing it out there because it occurred to me that this may solve the aesthetic issues while being clear on what identifier has what role. I'm sorry if this ends up just being more noise.
participants (1)
-
Federico Salerno