Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Hendra Gunawan
> Ilija and I have been working on and off on an RFC for pattern matching since > the early work on Enumerations. A number of people have noticed and said > they're looking forward to it. [THIS REPLY IS FOR THE CONVENIENCE OF https://externals.io READERS ONLY. SORRY FOR THE UNPLEASANT DISPLAY]

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Hendra Gunawan
> Ilija and I have been working on and off on an RFC for pattern matching since > the early work on Enumerations. A number of people have noticed and said > they're looking forward to it. Hello Larry. Thanks for this Juicy proposal. I agree that this proposal should be proposed as a whole. If

Re: [PHP-DEV] [RFC] Static class

2024-06-23 Thread Bilge
On 24/06/2024 00:29, Larry Garfield wrote: On the point of getting feedback on where people will vote now there's an RFC, I can only say with all honesty "Good luck." :-) This is by far the biggest challenge of making an RFC: the lack of a meaningful sense of how something will be received bef

Re: [PHP-DEV] [RFC] Static class

2024-06-23 Thread Larry Garfield
On Sun, Jun 23, 2024, at 6:10 PM, Bilge wrote: > Hi Internals! > > I am pleased to present my first RFC: Static class > . > > This work is based on the previous discussion thread on this list of the > same name, and hopefully captured all the relevant detail

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Larry Garfield
On Sun, Jun 23, 2024, at 2:14 PM, Andreas Hennings wrote: > This leads me to a different question regarding property guards. > What if we validate an object property guard, which later changes? > > class C { > public function __construct( > public readonly Point $point is Point { $z: 0 }; >

[PHP-DEV] [RFC] Static class

2024-06-23 Thread Bilge
Hi Internals! I am pleased to present my first RFC: Static class . This work is based on the previous discussion thread on this list of the same name, and hopefully captured all the relevant details, notwithstanding anything unanticipated that may prese

Re: [PHP-DEV] [RFC] Lazy Objects

2024-06-23 Thread Marco Pivetta
Hey Nicolas, Arnaud, On Tue, 4 Jun 2024 at 14:29, Nicolas Grekas wrote: > Please find all the details here: > https://wiki.php.net/rfc/lazy-objects > First of all, let me say that this is a fantastic RFC: having maintained both mine and Doctrine's version of lazy proxies for many years, this is

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Andreas Hennings
On Sun, 23 Jun 2024 at 18:28, Larry Garfield wrote: > > On Thu, Jun 20, 2024, at 8:35 PM, Andreas Hennings wrote: > >> Ilija and I have been working on and off on an RFC for pattern matching > >> since the early work on Enumerations. > > > > I like what I see, a lot! > > One quick thought that ca

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Robert Landers
On Sun, Jun 23, 2024 at 2:19 PM Rowan Tommins [IMSoP] wrote: > > > > On 22 June 2024 22:57:24 BST, Robert Landers wrote: > >In general, you assign the result of the operation so that the output > >is useful. Here's how that might look in PHP with the C# rules: > > > >function foo(BarInterface $ba

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Larry Garfield
On Thu, Jun 20, 2024, at 8:35 PM, Andreas Hennings wrote: >> Ilija and I have been working on and off on an RFC for pattern matching >> since the early work on Enumerations. > > I like what I see, a lot! > One quick thought that came to my mind, regarding objects: > Could we check method return va

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Larry Garfield
On Sat, Jun 22, 2024, at 12:14 PM, Brandon Jackson wrote: >> To clarify here, these all come as a set. Array shapes aren't their own >> "thing", they just fall out naturally from array patterns. So it's not >> possible for associative patterns to conflict with array shapes, as they are >> lit

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Larry Garfield
On Sat, Jun 22, 2024, at 12:43 AM, Robert Landers wrote: > Sorry, I wasn't exactly clear what I meant on scope. I wasn't > necessarily meaning the feature/RFC, but rather the scope of the > conversation. I count at least 12 new types of syntax here (possibly > more that I missed), and I would be s

Re: [PHP-DEV] [Early Feedback] Pattern matching

2024-06-23 Thread Rowan Tommins [IMSoP]
On 22 June 2024 22:57:24 BST, Robert Landers wrote: >In general, you assign the result of the operation so that the output >is useful. Here's how that might look in PHP with the C# rules: > >function foo(BarInterface $bar) { > $baz = $bar as Baz; > $baz?->thing(); > $bar->otherThing(); >}