Search
57 results · page 1 of 3
-
Discussion Revisiting typed closures
Seifeddine Gmati ·
I would rather wait for generics and possibly make Closure a generic type. — Rob Hi Rob, I don't think generics help here. PHP doesn't have generics at all yet, and realistically they're at least a couple …
-
Discussion Revisiting typed closures
Matthew Weier O'Phinney ·
I would rather wait for generics and possibly make Closure a generic type. Fair point, but I am worried that's misleading, and I would keep the two separate. Generics are a much larger and more contentious topic; typed …
-
Discussion Revisiting typed closures
Matheus Martins ·
I would rather wait for generics and possibly make Closure a generic type. Fair point, but I am worried that's misleading, and I would keep the two separate. Generics are a much larger and more contentious topic; typed …
-
Matheus Martins ·
… type identity. I think we should avoid committing PHP to a separate set of array-specific rules before the broader generics proposal has been discussed. Otherwise, we risk either constraining the generics design or ending up with two parameterization models …
-
Wendell Adriel ·
Hey Rowan, Your "level 1" sounds similar in spirit to the "bound-erased generics" RFC which was just declined: https://wiki.php.net/rfc/bound_erased_generic_types Reserving the syntax without directly enforcing it was not popular, and could …
-
Mark Randall ·
It keeps coming back to the feature we've all been praying to the PHP Gods for... generics. Replying to myself (sorry). I just wanted to point out that the same syntax would also solve your other issue from …
-
Wendell Adriel ·
… type identity. I think we should avoid committing PHP to a separate set of array-specific rules before the broader generics proposal has been discussed. Otherwise, we risk either constraining the generics design or ending up with two parameterization models …
-
Larry Garfield ·
… type identity. I think we should avoid committing PHP to a separate set of array-specific rules before the broader generics proposal has been discussed. Otherwise, we risk either constraining the generics design or ending up with two parameterization models …
-
Benjamin Morel ·
@Mark Randall [email protected] It keeps coming back to the feature we've all been praying to the PHP Gods for... generics. $x = cast<App.Object>($obj); I did not think about using generics for this, but indeed …
-
Discussion Revisiting typed closures
Larry Garfield ·
Making Closure generic (e.g., say Closure<Input, Output> ) would require Input to be variadic to stand in for a closure's parameter list, and variadic generics are a different beast entirely. FWIW, C# has a long list of …
-
Discussion Revisiting typed closures
Rowan Tommins [IMSoP] ·
Making Closure generic (e.g., say Closure<Input, Output> ) would require Input to be variadic to stand in for a closure's parameter list, and variadic generics are a different beast entirely. FWIW, C# has a long list of …
-
Larry Garfield ·
Hey Larry, I am opposed to this RFC, for all the reasons Rob mentioned. Moreover, I don't believe the issues can be resolved by just waiting for the reified generics RFC (which I really hope passes). The core …
-
Wendell Adriel ·
Hey Larry, I am opposed to this RFC, for all the reasons Rob mentioned. Moreover, I don't believe the issues can be resolved by just waiting for the reified generics RFC (which I really hope passes). The core issue …
-
Mark Randall ·
Aw. I did not think about a possible conflict here, thanks for bringing this up! It keeps coming back to the feature we've all been praying to the PHP Gods for... generics. function cast<type T>(object $obj …
-
… type identity. I think we should avoid committing PHP to a separate set of array-specific rules before the broader generics proposal has been discussed. Otherwise, we risk either constraining the generics design or ending up with two parameterization models …
-
Hi Opening a vote without hearing that some consensus exists before is a recipe for failure, so I'd rather send these reminders before opening one. I get the topic is not as hype as generics or other syntax improvements …
-
azjezz ·
… but this is still not type-safe, as we won't be able to type hint it correctly without using generics + `typename` type that exists in Hack. using generics + `typename` : `function check(mixed $var, typename $type): T` Cheers, - Saif Sent …
-
Rowan Tommins [IMSoP] ·
… to be on PHP 8.7 IMO, and then deferring Level 2 and 3 to a new RFC after the generics design. Defer the whole RFC after the generics design and aim for Implementation Level 2 or 3 (3 as …
-
Wendell Adriel ·
… array syntax work like proposed in the RFC. I don’t know where this fear comes from. I have monomorphized generics implemented in a branch already using the standard C<T> syntax and it works great. Combined with the struct …
-
discussion arraykey type
Dan Ackroyd ·
… implement it in userland. I'm pretty sure this idea fails all of those tests, except the last one. Without generics, it seems the need for an general arraykey type is low, for me at least. For the vast majority …