Re: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Deleu
On Wed, Jul 28, 2021, 05:26 Pierre Joye wrote: > However my question was more about the rush for it, those are not easy to > implement nicely, given the actual use cases, I am not sure it was worth > this hurry. And I have the same feeling for this discussion about nullable > intersection. > My

Re: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Pierre Joye
Hi Jordan, On Wed, Jul 28, 2021, 10:02 AM Jordan LeDoux wrote: > Intersection types are very useful if you use composition over > inheritance. That is, in PHP, they are most useful when you are using > multiple interfaces and/or traits to represent different aspects of an > object which might be

Re: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Jordan LeDoux
Intersection types are very useful if you use composition over inheritance. That is, in PHP, they are most useful when you are using multiple interfaces and/or traits to represent different aspects of an object which might be present. For example, using an actual library I maintain, I have a concep

Re: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Pierre Joye
Good morning, On Wed, Jul 28, 2021 at 5:52 AM Rowan Tommins wrote: > > On 27 July 2021 21:29:47 BST, "André Hänsel" wrote: > >> In fact, when 7.1 was released, none of the signatures changed in my > >code, they were just > >> updated to a different syntax. > > > >That by the way is only because

RE: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Rowan Tommins
On 27 July 2021 21:29:47 BST, "André Hänsel" wrote: >> In fact, when 7.1 was released, none of the signatures changed in my >code, they were just >> updated to a different syntax. > >That by the way is only because of a specific compatibility behavior >which is so confusing >that I erroneously rep

RE: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread André Hänsel
> In fact, when 7.1 was released, none of the signatures changed in my code, > they were just > updated to a different syntax. That by the way is only because of a specific compatibility behavior which is so confusing that I erroneously reported it as a bug: https://bugs.php.net/bug.php?id=80948

Re: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Jordan LeDoux
> - PHP 7.0 types were a pain because of non-nullable types, the feature only became really useful as of PHP 7.1 See, this keeps being said, but as another userland developer it's extremely confusing. The types in 7.0 were very useful, and I personally didn't notice at all that they were missing b

Re: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Brent Roose
Hi all From a userland developer point of view: - PHP 7.0 types were a pain because of non-nullable types, the feature only became really useful as of PHP 7.1 - I share many people's opinion that this falls in the category of oversight - I think (A&B)|null is the only sensible way to go Sidenot

Re: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Rowan Tommins
On 27/07/2021 14:32, Brent Roose wrote: From a userland developer point of view: - PHP 7.0 types were a pain because of non-nullable types, the feature only became really useful as of PHP 7.1 You're not the only person to say this, but I find it really hard to believe. If this was so urg

Re: [PHP-DEV] [RFC] Nullable intersection types

2021-07-27 Thread Andreas Leathley
On 23.07.21 11:58, Nicolas Grekas wrote: Hi everyone, as proposed by Nikita and Joe, I'm submitting this late RFC for your consideration for inclusion in PHP 8.1. Intersection types as currently accepted are not nullable. This RFC proposes to make them so. I wrote everything down about the reas

Re: [PHP-DEV] [RFC] Wall clock time based execution time

2021-07-27 Thread Deleu
On Sun, Jul 25, 2021 at 2:07 PM Máté Kocsis wrote: > Hi Deleu, > > What a coincidence! I've just added my PR to the "PHP 8.2" milestone on > GitHub. That means, I'll definitely want to continue the work on this > proposal > as soon as I finish my previous tasks. > > The reason that I delayed this