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

2024-06-21 Thread Robert Landers
On Sat, Jun 22, 2024 at 4:38 AM Gina P. Banyard wrote: > > On Friday, 21 June 2024 at 23:58, Robert Landers > wrote: > > As a user of PHP, this statement concerns me. I don't want any > > features rushed just because someone wants it "now" and thus end up > > with something feeling half-baked, m

[PHP-DEV] [RFC] [discussion] Deprecate FFI instance calls to non-static methods instead of static methods

2024-06-21 Thread chopins xiao
I've added a new RFC to deprecate FFI instance calls to non-static method. The PR https://github.com/php/php-src/commit/4acf0084dcd63ec369a610ec966db33f322694c8 deprecation of static methods is not a good solution. Now that the FFI API is a mess, this PR will make a fix impossible My RFC link h

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

2024-06-21 Thread Gina P. Banyard
On Friday, 21 June 2024 at 23:58, Robert Landers wrote: > As a user of PHP, this statement concerns me. I don't want any > features rushed just because someone wants it "now" and thus end up > with something feeling half-baked, missing important features or not > completely thought through. I thi

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

2024-06-21 Thread Gina P. Banyard
On Friday, 21 June 2024 at 19:19, Larry Garfield wrote: > On Fri, Jun 21, 2024, at 3:35 PM, Brandon Jackson wrote: > > 4. Object matching > > Absolutely a separate rfc please. Definitely needs discussion. Could > > intersect another potentially preferred solution like type aliases. > > Sending one

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

2024-06-21 Thread Robert Landers
On Fri, Jun 21, 2024 at 9:33 PM Larry Garfield wrote: > > On Fri, Jun 21, 2024, at 3:35 PM, Brandon Jackson wrote: > >> 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 lookin

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

2024-06-21 Thread Rowan Tommins [IMSoP]
On 21 June 2024 19:29:19 BST, Larry Garfield wrote: > >We *still* have different implicit coercion rules? I think Gina counted 10 contexts which behave slightly differently... Regards, -- Rowan Tommins [IMSoP]

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

2024-06-21 Thread Benjamin Außenhofer
On Fri, Jun 21, 2024 at 12:24 PM Nicolas Grekas < nicolas.grekas+...@gmail.com> wrote: > Hi Ben, > > On Tue, Jun 18, 2024, at 5:45 PM, Arnaud Le Blanc wrote: > Hi Larry, > > Following your feedback we propose to amend the API as follows: > > ``` > class ReflectionClas

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

2024-06-21 Thread Larry Garfield
On Fri, Jun 21, 2024, at 12:38 PM, Rowan Tommins [IMSoP] wrote: > On Thu, 20 Jun 2024, at 18:38, Larry Garfield wrote: >> Hello, peoples. >> >> 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

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

2024-06-21 Thread Larry Garfield
On Fri, Jun 21, 2024, at 3:35 PM, Brandon Jackson wrote: >> 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. > > Hi Larry, I have definitely been looking for

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

2024-06-21 Thread Larry Garfield
On Fri, Jun 21, 2024, at 3:57 PM, Marc Bennewitz wrote: >> Thank you all for your participation. > Is is already a really nice RFC, even if not finished yet. Also haven't > fully read it yet. > Thank you for all your work and time put into it! > > I do have some questions: > > * For the generics

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

2024-06-21 Thread Robert Landers
On Fri, Jun 21, 2024 at 6:58 PM Niels Dossche wrote: > > On 21/06/2024 14:43, Robert Landers wrote: > > On Fri, Jun 21, 2024 at 5:08 AM Andreas Hennings > > wrote: > >> > >>> Ilija and I have been working on and off on an RFC for pattern matching > >>> since the early work on Enumerations. > >>

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

2024-06-21 Thread John Bafford
> On Jun 21, 2024, at 11:42, Niels Dossche wrote: > > On 21/06/2024 14:43, Robert Landers wrote: >> On Fri, Jun 21, 2024 at 5:08 AM Andreas Hennings wrote: >>> >>> E.g. should something like array be added to the type system in >>> the future, or do we leave the type system behind, and rely

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Robert Landers
On Fri, Jun 21, 2024 at 4:50 PM Rowan Tommins [IMSoP] wrote: > > Le 21/06/2024 à 14:27, Robert Landers a écrit : > > This is why I wanted to work on "as" part of the pattern matching. It > isn't clear what will happen with the actual pattern matching RFC > (yet), but being able to do: > > some_fu

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Rowan Tommins [IMSoP]
On Fri, 21 Jun 2024, at 15:21, Pierre wrote: > I don't see the use of a syntax such as `$foo as ?int` since all > existing types of coercion are already possible via the cast syntax > (please correct me if I'm wrong). The current cast syntax (and its functional version, intval() etc) only perfo

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Robert Landers
On Fri, Jun 21, 2024 at 5:49 PM Pierre wrote: > > Le 21/06/2024 à 15:57, Robert Landers a écrit : > > On Fri, Jun 21, 2024 at 3:01 PM Pierre wrote: > >> Le 21/06/2024 à 14:27, Robert Landers a écrit : > >> > >> This is why I wanted to work on "as" part of the pattern matching. It > >> isn't clear

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

2024-06-21 Thread Marc Bennewitz
Hi Larry, On 20.06.24 19:38, Larry Garfield wrote: Hello, peoples. 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. It's definitely not going to make it into

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

2024-06-21 Thread Niels Dossche
On 21/06/2024 14:43, Robert Landers wrote: > On Fri, Jun 21, 2024 at 5:08 AM 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,

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

2024-06-21 Thread Brandon Jackson
> 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. Hi Larry, I have definitely been looking forward to this. Perhaps more so than property hooks and avis. >

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Pierre
Le 21/06/2024 à 15:57, Robert Landers a écrit : On Fri, Jun 21, 2024 at 3:01 PM Pierre wrote: Le 21/06/2024 à 14:27, Robert Landers a écrit : This is why I wanted to work on "as" part of the pattern matching. It isn't clear what will happen with the actual pattern matching RFC (yet), but being

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Robert Landers
On Fri, Jun 21, 2024 at 3:01 PM Pierre wrote: > > Le 21/06/2024 à 14:27, Robert Landers a écrit : > > This is why I wanted to work on "as" part of the pattern matching. It > isn't clear what will happen with the actual pattern matching RFC > (yet), but being able to do: > > some_function_expectin

Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-06-21 Thread Gina P. Banyard
On Wednesday, 19 June 2024 at 20:14, Claude Pache wrote: > Hi, > > Naming is hard, for sure. Here is my review. I find the names mostly > reasonable, except Round::PositiveInfinity and Round::NegativeInfinity. I > will discuss Round::PositiveInfinity. > > First: > > > I've discussed this wi

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Rowan Tommins [IMSoP]
> Le 21/06/2024 à 14:27, Robert Landers a écrit : >> This is why I wanted to work on "as" part of the pattern matching. It >> isn't clear what will happen with the actual pattern matching RFC >> (yet), but being able to do: >> >> some_function_expecting_int($_GET['foo'] as ?int); I've started d

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Pierre
Le 21/06/2024 à 14:27, Robert Landers a écrit : This is why I wanted to work on "as" part of the pattern matching. It isn't clear what will happen with the actual pattern matching RFC (yet), but being able to do: some_function_expecting_int($_GET['foo'] as ?int); And how about: some_functio

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

2024-06-21 Thread Robert Landers
On Fri, Jun 21, 2024 at 5:08 AM 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

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

2024-06-21 Thread Rowan Tommins [IMSoP]
On Thu, 20 Jun 2024, at 18:38, Larry Garfield wrote: > Hello, peoples. > > 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. Hi Larry, I haven't time to read

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Robert Landers
On Fri, Jun 21, 2024 at 12:54 AM Rowan Tommins [IMSoP] wrote: > > On 19/06/2024 16:34, Larry Garfield wrote: > > Also, as someone who does put every file into strict mode as a matter of > course, and appreciates the many languages that do not even have a > concept of non-strict mode (like Go or R

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

2024-06-21 Thread Tim Düsterhus
Hi On 6/20/24 10:49, Nicolas Grekas wrote: While Arnaud works on moving the code to the updated API, are there more comments on this RFC before we consider opening the vote? I plan to give the RFC another read-through, but will likely not get around to it before the next week. Best regards

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

2024-06-21 Thread Nicolas Grekas
Hi Ben, On Tue, Jun 18, 2024, at 5:45 PM, Arnaud Le Blanc wrote: >>> > Hi Larry, >>> > >>> > Following your feedback we propose to amend the API as follows: >>> > >>> > ``` >>> > class ReflectionClass >>> > { >>> > public function newLazyProxy(callable $factory, int $options): >>> object {} >>

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Paul Dragoonis
On Fri, Jun 21, 2024 at 10:12 AM Paul Dragoonis wrote: > > > On Thu, Jun 20, 2024 at 11:54 PM Rowan Tommins [IMSoP] < > imsop@rwec.co.uk> wrote: > >> On 19/06/2024 16:34, Larry Garfield wrote: >> >> Also, as someone who does put every file into strict mode as a matter of >> course, and appre

Re: [PHP-DEV] Renaming "strict types" to "scalar type coercion"

2024-06-21 Thread Paul Dragoonis
On Thu, Jun 20, 2024 at 11:54 PM Rowan Tommins [IMSoP] wrote: > On 19/06/2024 16:34, Larry Garfield wrote: > > Also, as someone who does put every file into strict mode as a matter of > course, and appreciates the many languages that do not even have a > concept of non-strict mode (like Go or Ru

Re: [PHP-DEV] [RFC] [Vote] New ext-dom features in PHP 8.4

2024-06-21 Thread Niels Dossche
On 20/06/2024 23:55, Matthew Weier O'Phinney wrote: > > > On Thu, Jun 20, 2024, 1:27 PM Niels Dossche > wrote: > > On 20/06/2024 16:28, Matthew Weier O'Phinney wrote: > > > > > > On Mon, Jun 10, 2024 at 1:15 PM Niels Dossche