Re: [PHP-DEV] RFC: Records

2024-11-16 Thread Larry Garfield
On Sat, Nov 16, 2024, at 5:14 PM, Rob Landers wrote: > Hello internals, > > I'm ready as I'm going to be to introduce to you: "Records" > https://wiki.php.net/rfc/records! > > Records allow for a lightweight syntax for defining value objects. > These are superior to read-only classes due to havin

Re: [PHP-DEV] RFC: Records

2024-11-16 Thread Ilija Tovilo
Hi Rob On Sun, Nov 17, 2024 at 12:15 AM Rob Landers wrote: > > Hello internals, > > I'm ready as I'm going to be to introduce to you: "Records" > https://wiki.php.net/rfc/records! Thanks for your proposal. I very much agree that value semantics are a highly desirable feature. I sent out my con

[PHP-DEV] RFC: Records

2024-11-16 Thread Rob Landers
Hello internals, I'm ready as I'm going to be to introduce to you: "Records" https://wiki.php.net/rfc/records! Records allow for a lightweight syntax for defining value objects. These are superior to read-only classes due to having value semantics and far less boilerplate, for most things deve

Re: [PHP-DEV] Optional interfaces

2024-11-16 Thread Rob Landers
On Sat, Nov 16, 2024, at 12:43, Valentin Udaltsov wrote: > On Sat, 16 November 2024 at 13:42 Rob Landers wrote: >> __ >> On Sat, Nov 16, 2024, at 10:02, Juris Evertovskis wrote: >>> Is there some reason you cannot do this: >>> >>> https://3v4l.org/hF1vr >>> >>> Unless I’m missing something,

Re: [PHP-DEV] Optional interfaces

2024-11-16 Thread Valentin Udaltsov
On Sat, 16 November 2024 at 13:42 Rob Landers wrote: > On Sat, Nov 16, 2024, at 10:02, Juris Evertovskis wrote: > > Is there some reason you cannot do this: > > > > https://3v4l.org/hF1vr > > > > Unless I’m missing something, you can’t patch-define a namespaced > OptionalInterface that easily. >

Re: [PHP-DEV] Optional interfaces

2024-11-16 Thread Rob Landers
On Sat, Nov 16, 2024, at 01:27, Marco Aurélio Deleu wrote: > >> On 15 Nov 2024, at 20:42, Rob Landers wrote: >>  >> On Sat, Nov 16, 2024, at 00:34, Juris Evertovskis wrote: >>> Hey all, >>> >>> If you try to implement an interface that does not exist, you get the >>> ‘Interface “%s” not found

Re: [PHP-DEV] Optional interfaces

2024-11-16 Thread Rob Landers
On Sat, Nov 16, 2024, at 10:02, Juris Evertovskis wrote: > Is there some reason you cannot do this: > > https://3v4l.org/hF1vr > > Unless I’m missing something, you can’t patch-define a namespaced > OptionalInterface that easily. > > Anyway, I was not implying this is something impossible to

RE: [PHP-DEV] Optional interfaces

2024-11-16 Thread Juris Evertovskis
Is there some reason you cannot do this: https://3v4l.org/hF1vr Unless I’m missing something, you can’t patch-define a namespaced OptionalInterface that easily. Anyway, I was not implying this is something impossible to accomplish. My point is that it would be beneficial to have synta