Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Paul Crovella
On Fri, May 14, 2021 at 4:44 PM Aaron Piotrowski wrote: > > My issue is the dual-meaning of ? in the current proposal. In `foo(?, 42)`, > the ? represents a single argument, but adding a trailing ? (such as in > `foo(?, 42, ?)`) represents any number of arguments. Would it perhaps make > sense

Re: [PHP-DEV] [RFC]: Allow static properties in enums

2021-05-17 Thread tyson andre
> > On Mon, May 17, 2021, at 9:16 AM, Michał Marcin Brzuchalski wrote: > > > pon., 17 maj 2021, 16:02 użytkownik tyson andre < > > tysonandre...@hotmail.com> > > > napisał: > > > > > > > Hi internals, > > > > > > > > I've created a new RFC > > > > https://wiki.php.net/rfc/enum_allow_static_properti

Re: [PHP-DEV] Re: [RFC] [Discussion] Final constants

2021-05-17 Thread Gabriel Caruso
On Sun, 16 May 2021, 15:52 Máté Kocsis, wrote: > As I've fully finished the implementation, I intend to bring this to a vote > on Wednesday if no new concerns come up (besides the usual question about > the usefulness of the feature). > > Máté Interesting RFC Maté, thanks for bringing it. How

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Alexandru Pătrănescu
On Mon, May 17, 2021, 19:53 Guilliam Xavier wrote: > > > On Mon, May 17, 2021 at 5:47 PM Alexandru Pătrănescu > wrote: > >> >> On Mon, May 17, 2021 at 6:36 PM Guilliam Xavier < >> guilliam.xav...@gmail.com> wrote: >> >>> On Mon, May 17, 2021 at 5:01 PM Levi Morrison < >>> levi.morri...@datadoghq

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Guilliam Xavier
On Mon, May 17, 2021 at 5:47 PM Alexandru Pătrănescu wrote: > > On Mon, May 17, 2021 at 6:36 PM Guilliam Xavier > wrote: > >> On Mon, May 17, 2021 at 5:01 PM Levi Morrison < >> levi.morri...@datadoghq.com> >> wrote: >> >> > Joe Watkins has successfully worked out some bugs that also enable >> >

Re: [PHP-DEV] [RFC]: Allow static properties in enums

2021-05-17 Thread Michał Marcin Brzuchalski
pon., 17 maj 2021, 16:31 użytkownik Larry Garfield napisał: > On Mon, May 17, 2021, at 9:16 AM, Michał Marcin Brzuchalski wrote: > > pon., 17 maj 2021, 16:02 użytkownik tyson andre < > tysonandre...@hotmail.com> > > napisał: > > > > > Hi internals, > > > > > > I've created a new RFC > > > https:/

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Alexandru Pătrănescu
On Mon, May 17, 2021 at 6:36 PM Guilliam Xavier wrote: > On Mon, May 17, 2021 at 5:01 PM Levi Morrison > > wrote: > > > Joe Watkins has successfully worked out some bugs that also enable > > more powerful behavior. Thanks to Nikita and any others who worked > > with Joe on fixing these issues an

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Guilliam Xavier
On Mon, May 17, 2021 at 5:01 PM Levi Morrison wrote: > Joe Watkins has successfully worked out some bugs that also enable > more powerful behavior. Thanks to Nikita and any others who worked > with Joe on fixing these issues and reviewing the PR. > > The short of it is that re-ordering parameters

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Guilliam Xavier
On Mon, May 17, 2021 at 5:16 PM Mike Schinkel wrote: > > > On May 17, 2021, at 10:50 AM, Guilliam Xavier > wrote: > > > > On Mon, May 17, 2021 at 6:58 AM Mike Schinkel wrote: > >> > >> > Well, I was thinking that by changing the proposed syntax we could >> achieve >> > what is proposed and a li

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Alexandru Pătrănescu
On Mon, May 17, 2021 at 6:16 PM Mike Schinkel wrote: > > > > On May 17, 2021, at 10:50 AM, Guilliam Xavier > wrote: > > > > > > > > On Mon, May 17, 2021 at 6:58 AM Mike Schinkel > wrote: > > > > Casting is another interesting approach that does feel more consistent >

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Mike Schinkel
> On May 17, 2021, at 10:50 AM, Guilliam Xavier > wrote: > > > > On Mon, May 17, 2021 at 6:58 AM Mike Schinkel > wrote: > > > > Well, I was thinking that by changing the proposed syntax we could achieve > > what is proposed and a little bit more. > > Also we wou

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Levi Morrison via internals
Joe Watkins has successfully worked out some bugs that also enable more powerful behavior. Thanks to Nikita and any others who worked with Joe on fixing these issues and reviewing the PR. The short of it is that re-ordering parameters when using named placeholders is now technically possible. We w

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Guilliam Xavier
On Mon, May 17, 2021 at 6:58 AM Mike Schinkel wrote: > > > On May 16, 2021, at 10:43 PM, Hossein Baghayi > wrote: > > > > On Sat, 15 May 2021 at 09:03, Hossein Baghayi > > > wrote: > > > >> Providing ? as a means of placeholder for some arguments and ignoring > the > >> rest could complicate th

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

2021-05-17 Thread G. P. B.
On Mon, 17 May 2021 at 15:17, Larry Garfield wrote: > On the reflection front, am I correct that we'd end up with: > > abstract ReflectionType > -- ReflectionNamedType (single type) > -- ReflectionUnionType (basically an array of named types) > -- ReflectionIntersectionType (basically an array of

Re: [PHP-DEV] [RFC]: Allow static properties in enums

2021-05-17 Thread Larry Garfield
On Mon, May 17, 2021, at 9:16 AM, Michał Marcin Brzuchalski wrote: > pon., 17 maj 2021, 16:02 użytkownik tyson andre > napisał: > > > Hi internals, > > > > I've created a new RFC > > https://wiki.php.net/rfc/enum_allow_static_properties > > > > Although enums are immutable objects, it is often us

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

2021-05-17 Thread Larry Garfield
On Mon, May 17, 2021, at 3:58 AM, G. P. B. wrote: > Hello internals, > > As we are getting closer to feature freeze I want to move this proposal > forward. > The RFC is now also on the wiki: > https://wiki.php.net/rfc/pure-intersection-types > > Composite types are left out of scope as it seems t

Re: [PHP-DEV] [RFC]: Allow static properties in enums

2021-05-17 Thread Michał Marcin Brzuchalski
pon., 17 maj 2021, 16:02 użytkownik tyson andre napisał: > Hi internals, > > I've created a new RFC > https://wiki.php.net/rfc/enum_allow_static_properties > > Although enums are immutable objects, it is often useful to have functions > or methods that operate on enum instances. > In many cases,

[PHP-DEV] [RFC]: Allow static properties in enums

2021-05-17 Thread tyson andre
Hi internals, I've created a new RFC https://wiki.php.net/rfc/enum_allow_static_properties Although enums are immutable objects, it is often useful to have functions or methods that operate on enum instances. In many cases, it would make sense to declare that functionality as static methods on

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

2021-05-17 Thread G. P. B.
Hello internals, As we are getting closer to feature freeze I want to move this proposal forward. The RFC is now also on the wiki: https://wiki.php.net/rfc/pure-intersection-types Composite types are left out of scope as it seems they should be handled with grouping (e.g. (A&B) | C ) and not rely

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Rowan Tommins
On 25/04/2021 20:25, Larry Garfield wrote: Greetings, Internalians! I would like to offer for your consideration another RFC, specifically syntax for partial function application. https://wiki.php.net/rfc/partial_function_application During off-list discussions, it's become clear that there