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

2024-06-20 Thread Andreas Hennings
> 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 values? if ($x is Countable { count(): 0 }) ... if ($p is Point {

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

2024-06-20 Thread Benjamin Außenhofer
On Thu, Jun 20, 2024 at 10:52 AM Nicolas Grekas < nicolas.grekas+...@gmail.com> wrote: > > > Le mar. 18 juin 2024 à 22:59, Larry Garfield a > écrit : > >> 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

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

2024-06-20 Thread Morgan
On 2024-06-21 05:38, Larry Garfield wrote: Hello, peoples. To that end, we're looking for *very high level* feedback on this RFC: https://wiki.php.net/rfc/pattern-matching As I started reading I starting thinking of "whatabouts" based on my experience with pattern matching in other

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

2024-06-20 Thread Matthew Weier O'Phinney
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 > wrote: > > > > Hi internals > > > > I'm opening the vote of my RFC "New ext-dom features

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

2024-06-20 Thread Rowan Tommins [IMSoP]
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 Rust), I really don't appreciate the backhanded comments in this thread

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

2024-06-20 Thread Bruce Weirdan
This definitely looks like a powerful feature I'm looking forward to. If property/param/return guards are implemented, do you see them eventually replacing the property/param/return types we have nowadays? Asking for a friend.

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

2024-06-20 Thread Larry Garfield
On Thu, Jun 20, 2024, at 8:29 PM, Thomas Bley wrote: >> https://wiki.php.net/rfc/pattern-matching > Thank you! > >> $var is *; // Matches anything, more useful in the structure patterns below. > > maybe also consider: > > $var is mixed; // Matches anything, more useful in the structure patterns

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

2024-06-20 Thread Larry Garfield
On Thu, Jun 20, 2024, at 8:22 PM, Lynn wrote: > On Thu, Jun 20, 2024 at 7:41 PM Larry Garfield wrote: >> https://wiki.php.net/rfc/pattern-matching > I have been looking forward to this RFC, it's such a quality of life to > be able to do all this! In terms of things to focus on, I'd personally

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

2024-06-20 Thread Thomas Bley
> Larry Garfield hat am 20.06.2024 19:38 CEST > geschrieben: > > > 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

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

2024-06-20 Thread Lynn
On Thu, Jun 20, 2024 at 7:41 PM 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

Re: [PHP-DEV] [RFC] Static Constructor

2024-06-20 Thread Rowan Tommins [IMSoP]
On 19/06/2024 13:33, Erick de Azevedo Lima wrote: I searched internals and found a discussion from almost a decade ago. That discussion did not end well, mostly because of insulting accusations. If you're talking about the March/April 2015 thread, I don't think that's a fair summary. There

Re: [PHP-DEV] [RFC] Static Constructor

2024-06-20 Thread Mike Schinkel
> On Jun 20, 2024, at 9:01 AM, Erick de Azevedo Lima > wrot > Mike again: > > > Consider that some uses for a static function need to always occur no matter > > whether or not any other method of the class is called. My previous email > > [1] covered several. > > Here [2] is a discussion on

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

2024-06-20 Thread Niels Dossche
On 20/06/2024 16:28, Matthew Weier O'Phinney wrote: > > > On Mon, Jun 10, 2024 at 1:15 PM Niels Dossche > wrote: > > Hi internals > > I'm opening the vote of my RFC "New ext-dom features in PHP 8.4". > RFC link:

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

2024-06-20 Thread Rodrigo Vieira
OMG, this RFC is a true masterpiece!!! Congratulations, it turned out really well! I hope this gets approved soon! Rodrigo A. Vieira Em 20 de jun. de 2024, 15:03 -0300, Eugene Sidelnyk , escreveu: > You won't believe it, but just right now I've been thinking about that it > would be a

Re: [PHP-DEV] Re: RFC karma request

2024-06-20 Thread Ilija Tovilo
Hi Bilage On Thu, Jun 20, 2024 at 7:55 PM Bilge wrote: > > > > Re: Static class, I would like to propose an RFC for this feature. My > > wiki account is: bilge. > > > > Cheers, > > Bilge > > > If there is some reason why I should not be able to do this, please let > it be known. Sorry for the

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

2024-06-20 Thread Eugene Sidelnyk
You won't believe it, but just right now I've been thinking about that it would be a wonderful feature for PHP to have some kind of type-tests (like `$a is Foo` or `$b is Foo|Baz|null`), and here you write out this email. I didn't read the whole RFC, but I'd like to say that having at least

[PHP-DEV] Re: RFC karma request

2024-06-20 Thread Bilge
On 18/06/2024 20:27, Bilge wrote: Hi Internals, Re: Static class, I would like to propose an RFC for this feature. My wiki account is: bilge. Cheers, Bilge If there is some reason why I should not be able to do this, please let it be known. Cheers, Bilge

[PHP-DEV] [Early Feedback] Pattern matching

2024-06-20 Thread Larry Garfield
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 8.4, but we are looking for early feedback on

[PHP-DEV] PHP 8.3.9RC1 Ready for testing

2024-06-20 Thread Jakub Zelenka
PHP 8.3.9RC1 has just been released and can be downloaded from: https://downloads.php.net/~jakub/ or https://qa.php.net/ or use the git tag: php-8.3.9RC1 Windows binaries are available at: https://windows.php.net/qa/#php-8.3 Please test it carefully, and report any bugs to

[PHP-DEV] PHP 8.2.21RC1 Ready for testing

2024-06-20 Thread Sergey Panteleev
PHP 8.2.21RC1 has just been released and can be downloaded from: https://downloads.php.net/~sergey/ or https://qa.php.net/ or use the git tag: php-8.2.21RC1 Windows binaries are available at: https://windows.php.net/qa/#php-8.2 Please test it carefully, and report any bugs to

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

2024-06-20 Thread Matthew Weier O'Phinney
On Mon, Jun 10, 2024 at 1:15 PM Niels Dossche wrote: > Hi internals > > I'm opening the vote of my RFC "New ext-dom features in PHP 8.4". > RFC link: https://wiki.php.net/rfc/dom_additions_84 > Voting runs until 24th of June 21:00 GMT+2. > > Kind regards > Niels > Question: why is

Re: [PHP-DEV] [RFC] Static Constructor

2024-06-20 Thread Jorg Sowa
Hi Erick, It would be useful to include the example of Singleton implementation with a static constructor. Kind regards, Jorg

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

2024-06-20 Thread Claude Pache
> Le 20 juin 2024 à 13:08, Vincent de Lau a écrit : > > > > From: Gina P. Banyard > Sent: Wednesday, June 19, 2024 5:08 PM >> >> On Tuesday, 18 June 2024 at 17:37, Robert Landers >> wrote: >> >>> Hello internals, >>> >>> [...] >>> >>> What are your thoughts? >> >> As self-proclaimed

Re: [PHP-DEV] [RFC] Static Constructor

2024-06-20 Thread Erick de Azevedo Lima
Hi all. Answering to Larry: > More complex initialization of things like lookup tables or "dynamic constants" (like if you wanted to record "now" to use for later comparisons). Those are my use cases, to be honest. > For that reason, therefore, I don't like the current approach, especially for

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

2024-06-20 Thread Vincent de Lau
From: Gina P. Banyard Sent: Wednesday, June 19, 2024 5:08 PM > > On Tuesday, 18 June 2024 at 17:37, Robert Landers > wrote: > > > Hello internals, > > > > [...] > > > > What are your thoughts? > > As self-proclaimed leading expert on PHP type juggling. > That it is a terrible idea with no

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

2024-06-20 Thread Marco Pivetta
Hey Nicolas, On Thu, 20 Jun 2024 at 10:50, 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? > Due to IRL events, I haven't checked the text thoroughly yet, but I think I should, given

Re: [PHP-DEV] [RFC] Static Constructor

2024-06-20 Thread Lynn
On Wed, Jun 19, 2024 at 11:57 PM Mike Schinkel wrote: > On Jun 19, 2024, at 2:36 PM, Ilija Tovilo wrote: > On Wed, Jun 19, 2024 at 2:34 PM Erick de Azevedo Lima > wrote: > > New expressions continue to not be supported in (static and non-static) > property initializers and class constant

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

2024-06-20 Thread Nicolas Grekas
Le mar. 18 juin 2024 à 22:59, Larry Garfield a écrit : > 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