Re: [RFC] Pattern Matching
| From: | Zebulan | Date: | Fri, 05 Dec 2025 15:10:30 +0000 |
| Subject: | Re: [RFC] Pattern Matching | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-129562@lists.php.net to get a copy of this message | ||
Some typos I spotted in the RFC:
"Structure patterns" -> "Object pattern" section: color: green should be
color: 'green' (twice)
"Future Scope" -> "Regex pattern" section: "idiation" should be
"ideation"
Also, to better justify the syntax for variable pinning, perhaps it might be worth mentioning that
the caret character kinda looks like a pin? I'm not entirely sold on the syntax myself, but I
think that visual association makes it easier to mentally parse.
Finally, in the research document, I see there was some confusion about the C# syntax for variable
binding. I think the idea is that the right-hand side looks like a variable declaration, so since
int foo is how you define an integer variable named foo, therefore it makes sense to reuse the
syntax in bar is int foo.