Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-04 Thread Pierre Joye
Hi Nikita, On Tue, Jan 4, 2022 at 12:38 AM Nikita Popov wrote: > > On Mon, Jan 3, 2022 at 1:14 AM Jordan LeDoux > wrote: > > > Hello internals, > > > > I've opened voting on > > https://wiki.php.net/rfc/user_defined_operator_overloads. The voting will > > close on 2022-01-17. > > > > To review p

Re: [PHP-DEV] RFC: Trait expects interface

2022-01-04 Thread Kirill Nesmeyanov
>Среда, 5 января 2022, 4:17 +03:00 от Larry Garfield : >  >On Tue, Jan 4, 2022, at 4:35 PM, Kirill Nesmeyanov wrote: >> Hello internals! >> >> Since «traits» are often an indicator of not very good code and many >> may not use them quite correctly, for example, as helpers, I suggest >> adding suppo

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-04 Thread Marco Pivetta
On Wed, Jan 5, 2022 at 3:19 AM Jordan LeDoux wrote: > > On Tue, Jan 4, 2022 at 1:27 AM Marco Pivetta wrote: > > Can I expect this for other math related RFCs, or is this dogmatic about > operator overload specifically? I have no clue, and at the very least, I > would like to learn that. > It's

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-04 Thread Jordan LeDoux
On Tue, Jan 4, 2022 at 1:27 AM Marco Pivetta wrote: > > I know you're picking on details here, but believe me, I'm serious when > I'm saying "use matlab". > > In fact, I did work on financial products where (from Java PHP and Python) > we used the MATLAB Compiler to create binaries and dynamic li

Re: [PHP-DEV] RFC: Trait expects interface

2022-01-04 Thread Larry Garfield
On Tue, Jan 4, 2022, at 4:35 PM, Kirill Nesmeyanov wrote: > Hello internals! > > Since «traits» are often an indicator of not very good code and many > may not use them quite correctly, for example, as helpers, I suggest > adding support for the `expects` keyword to indicate that the trait is >

Re: [PHP-DEV] RFC: Trait expects interface

2022-01-04 Thread Dusk
On Jan 4, 2022, at 14:35, Kirill Nesmeyanov wrote: > Since «traits» are often an indicator of not very good code and many may not > use them quite correctly, for example, as helpers, I suggest adding support > for the `expects` keyword to indicate that the trait is part of the code > decomposit

Re: [PHP-DEV] RFC: Trait expects interface

2022-01-04 Thread Bruce Weirdan
On Wed, Jan 5, 2022 at 12:36 AM Kirill Nesmeyanov wrote: > Since «traits» are often an indicator of not very good code and many may not > use them quite correctly, for example, as helpers, I suggest adding support > for the `expects` keyword to indicate that the trait is part of the code > deco

[PHP-DEV] RFC: Trait expects interface

2022-01-04 Thread Kirill Nesmeyanov
Hello internals! Since «traits» are often an indicator of not very good code and many may not use them quite correctly, for example, as helpers, I suggest adding support for the `expects` keyword to indicate that the trait is part of the code decomposition taking into account ISP. For example

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-04 Thread Marco Pivetta
Hey Jordan, On Tue, Jan 4, 2022 at 3:23 AM Jordan LeDoux wrote: > > But why shouldn't it be `==`... these are valid use cases for a > comparison; equally, vector additions ($vector1 + $vector2) are quite > commonplace in mathematics > - Source: https://twitter.com/Mark_Baker/status/1478131480

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-04 Thread Côme Chilliet
Hello, From the RFC: > If the left operand produces a TypeError due to the parameter types listed in > the implementation, the operation is not retried with the right operand and > the error is instead returned immediately. This is to help developers > encounter errors in their program logic a