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

Re: [PHP-DEV] Optional interfaces

2024-11-15 Thread Marco Aurélio Deleu
> 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’ error. Usually that’s useful as it points to a >> cod

Re: [PHP-DEV] Optional interfaces

2024-11-15 Thread Rob Landers
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’ error. Usually that’s useful as it points to a > code error. > > However, sometimes we want our code to be compatible with