Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-07-07 Thread Rob Landers
After some consideration and lack of enthusiasm; I'm withdrawing this RFC. — Rob

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-30 Thread Rob Landers
On Sun, Jun 30, 2024, at 13:37, Saki Takamachi wrote: > > Hi, > >> On Sun, Jun 30, 2024, at 13:05, Saki Takamachi wrote: >>> >>> Hi, >>> > I'm not sure. Does this mean that such "hack" is unavoidable? > > And I don't really understand what "pointless hack" means. This would

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-30 Thread Saki Takamachi
Hi, >> On Sun, Jun 30, 2024, at 13:05, Saki Takamachi wrote: >> >> Hi, >> I'm not sure. Does this mean that such "hack" is unavoidable? And I don't really understand what "pointless hack" means. This would make sense if operator overloading was already allowed, but it isn't

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-30 Thread Rob Landers
On Sun, Jun 30, 2024, at 13:05, Saki Takamachi wrote: > > Hi, > >>> I'm not sure. Does this mean that such "hack" is unavoidable? >>> >>> And I don't really understand what "pointless hack" means. This would make >>> sense if operator overloading was already allowed, but it isn't. >> >> Not

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-30 Thread Saki Takamachi
Hi, >> I'm not sure. Does this mean that such "hack" is unavoidable? >> >> And I don't really understand what "pointless hack" means. This would make >> sense if operator overloading was already allowed, but it isn't. > > Not unavoidable, but pointless. For example, I attempted to create a Stri

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-30 Thread Rob Landers
On Sun, Jun 30, 2024, at 09:31, Saki Takamachi wrote: > Hi, > > >> It seems like the "hack" I mentioned is still possible, am I > >> misunderstanding something? > > > > That’s always going to be a possibility, no matter what we do or how we do > > it. I think it would be a rather pointless ha

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-30 Thread Saki Takamachi
Hi, >> It seems like the "hack" I mentioned is still possible, am I >> misunderstanding something? > > That’s always going to be a possibility, no matter what we do or how we do > it. I think it would be a rather pointless hack now that I can run the code. > For the most part, the engine treat

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
On Sun, Jun 30, 2024, at 06:59, Rob Landers wrote: > > > On Sun, Jun 30, 2024, at 01:28, Saki Takamachi wrote: >> Hi, >> >> > Hello internals, >> > >> > I've updated the RFC to include final-ish examples (barring any further >> > constructive feedback), a prototype implementation, and an objec

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
On Sun, Jun 30, 2024, at 01:28, Saki Takamachi wrote: > Hi, > > > Hello internals, > > > > I've updated the RFC to include final-ish examples (barring any further > > constructive feedback), a prototype implementation, and an objections > > section. > > > > Cheers, > > > > Rob > > It seems

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Saki Takamachi
Hi, > Hello internals, > > I've updated the RFC to include final-ish examples (barring any further > constructive feedback), a prototype implementation, and an objections section. > > Cheers, > > Rob It seems like the "hack" I mentioned is still possible, am I misunderstanding something? An

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
Hello internals, I've updated the RFC to include final-ish examples (barring any further constructive feedback), a prototype implementation, and an objections section. Cheers, Rob

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Gina P. Banyard
On Friday, 28 June 2024 at 18:46, Rob Landers wrote: > Hello internals, > > I'd like to introduce a new RFC: > https://wiki.php.net/rfc/operator_overrides_lite which extends the GMP > extension to support a limited set of operator overriding to developers. It's > designed to be limited and rel

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
On Sat, Jun 29, 2024, at 17:37, Ben Ramsey wrote: > > On Jun 29, 2024, at 10:16, Larry Garfield wrote: > > > > For clarity (since I know from experience it's helpful to RFC authors to > > have a concrete sense of votes in advance): I will be voting No on this > > RFC. As both Jordan and Saki h

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Ben Ramsey
> On Jun 29, 2024, at 10:16, Larry Garfield wrote: > > For clarity (since I know from experience it's helpful to RFC authors to have > a concrete sense of votes in advance): I will be voting No on this RFC. As > both Jordan and Saki have explained, it's a hideous hack that doesn't look > like

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
On Sat, Jun 29, 2024, at 16:19, Saki Takamachi wrote: > Hi, > > >> Here are my thoughts on your code. > >> > >> In theory, inheriting from this "improved GMP class" would allow > >> overloading of computational operators. > >> > >> In effect, this acts like a "calcable interface", with the cons

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Larry Garfield
On Sat, Jun 29, 2024, at 7:28 AM, Saki Takamachi wrote: > Hi, > >> On Sat, Jun 29, 2024, at 02:13, Jordan LeDoux wrote: > 4. The `static` distinction is also fairly meaningless, as in PHP there > is no situation possible where an operator overload can occur WITHOUT it > operating on o

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Saki Takamachi
I'll add a little more. > I would like to state my opinion on this matter, making it clear that I am of > the opinion that "GMP class should be final." > > First of all, to meet the requirements that are the basis of this discussion, > it is not actually necessary to expose the calculation logi

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Saki Takamachi
Hi, >> Here are my thoughts on your code. >> >> In theory, inheriting from this "improved GMP class" would allow overloading >> of computational operators. >> >> In effect, this acts like a "calcable interface", with the constructor >> passing in meaningless values to the parent constructor an

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
On Sat, Jun 29, 2024, at 14:28, Saki Takamachi wrote: > > Hi, > >> On Sat, Jun 29, 2024, at 02:13, Jordan LeDoux wrote: > 4. The `static` distinction is also fairly meaningless, as in PHP there > is no situation possible where an operator overload can occur WITHOUT it > operating on

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Saki Takamachi
Hi, > On Sat, Jun 29, 2024, at 02:13, Jordan LeDoux wrote: >>> 4. The `static` distinction is also fairly meaningless, as in PHP there is >>> no situation possible where an operator overload can occur WITHOUT it >>> operating on objects themselves. >> >> For this, that is the wrong approach. Th

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
On Sat, Jun 29, 2024, at 02:13, Jordan LeDoux wrote: >>> 4. The `static` distinction is also fairly meaningless, as in PHP there is >>> no situation possible where an operator overload can occur WITHOUT it >>> operating on objects themselves. >> >> For this, that is the wrong approach. The act

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
On Sat, Jun 29, 2024, at 11:01, Rob Landers wrote: > On Sat, Jun 29, 2024, at 02:13, Jordan LeDoux wrote: >> >> >> On Fri, Jun 28, 2024 at 12:55 PM Rob Landers wrote: >>> __ >>> >>> 3. The private/protected distinction is fairly meaningless for the functions that implement overloa

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-29 Thread Rob Landers
On Sat, Jun 29, 2024, at 02:13, Jordan LeDoux wrote: > > > On Fri, Jun 28, 2024 at 12:55 PM Rob Landers wrote: >> __ >> >> >>> 3. The private/protected distinction is fairly meaningless for the >>> functions that implement overloads, because the privacy of the function is >>> ignored complet

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-28 Thread Jordan LeDoux
On Fri, Jun 28, 2024 at 12:55 PM Rob Landers wrote: > > > 3. The private/protected distinction is fairly meaningless for the > functions that implement overloads, because the privacy of the function is > ignored completely when it is executed to evaluate an operator. > > > Hmm. I like the idea of

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-28 Thread Rob Landers
On Fri, Jun 28, 2024, at 20:39, Jordan LeDoux wrote: > > > On Fri, Jun 28, 2024 at 10:47 AM Rob Landers wrote: >> __ >> Hello internals, >> >> I'd like to introduce a new RFC: >> https://wiki.php.net/rfc/operator_overrides_lite which extends the GMP >> extension to support a limited set of

Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition

2024-06-28 Thread Jordan LeDoux
On Fri, Jun 28, 2024 at 10:47 AM Rob Landers wrote: > Hello internals, > > I'd like to introduce a new RFC: > https://wiki.php.net/rfc/operator_overrides_lite which extends the GMP > extension to support a limited set of operator overriding to developers. > It's designed to be limited and relativ