On Wed, Jun 26, 2024 at 3:10 PM Bilge <bi...@scriptfusion.com> wrote:

> On 26/06/2024 21:56, Casper Langemeijer wrote:
>
>  Generics or bust.
>
>
> I do not understand the reasoning behind that. Is it because we really
> want generics, but when the 95% use-case is solved we fear that there would
> not be enough momentum to get that? I'd love to have generics too, but a
> very simple array syntax would in my opinion still add a lot of value, even
> if we already had generics.
>
> It's not that there wouldn't be enough momentum; if anything, a successful
> typed arrays PR could give rise to such momentum. If it were possible to
> have typed arrays that were fully compatible with an (imagined) generics
> specification then I would be all for it. The problem is, how can we ever
> ensure compatibility with something that doesn't exist?
>
> It seems to me we either solve is problem properly (with generics) or not
> at all.
>
> Cheers,
> Bilge
>

I disagree, in fact it would be super easy to make T[] translate to
array<T> if generics ever become a thing in php, but it doesn't make any
sense to keep holding off on implementing this just because it might not be
compatible with an implementation of generics that may never come.

Cheers,
Lanre

Reply via email to