On 2 August 2016 at 09:11, Dan Ackroyd <dan...@basereality.com> wrote:

> Hi Tomáš,
>
> It has been thought about, and several people are looking at an
> implementation of generics: https://wiki.php.net/rfc/generics However,
> it seems quite hard to implement.
>
> I am beginning to wonder if rather than aiming for full support of
> generics listed in that RFC, instead we just aimed for arrays that can
> only contain one type of variable as a good first step.
>
> cheers
> Dan
>
>
It's probably worth noting that creating "arrays" that can only contain one
type of variable is already possible by implementing ArrayAccess, Iterator
and Countable.

It won't work exactly like arrays and probably never will (see
https://www.mail-archive.com/internals%40lists.php.net/msg59199.html) but
might be worth as a starting point.

Regards
Peter


-- 
CV: careers.stackoverflow.com/peterlind
LinkedIn: plind
Twitter: kafe15

Reply via email to