Re: [PHP-DEV] Re: [RFC] Iterable

2016-06-13 Thread Fleshgrinder
On 6/13/2016 5:59 PM, Levi Morrison wrote: > My opinion is contrary: the union type is the cleaner solution as it > does not require special casing machinery in the engine. > I am a huge fan of the union types but this is such a common requirement that it requires a pseudo compound type in my opi

Re: [PHP-DEV] Re: [RFC] Iterable

2016-06-13 Thread Christoph Becker
On 13.06.2016 at 17:59, Levi Morrison wrote: > On Mon, Jun 13, 2016 at 5:42 AM, Christoph Becker wrote: >> On 11.06.2016 at 01:37, Aaron Piotrowski wrote: >>> I would like to propose a new iterable pseudo-type that accepts both arrays >>> and objects implementing Traversable. Values accepted by

Re: [PHP-DEV] Re: [RFC] Iterable

2016-06-13 Thread Levi Morrison
On Mon, Jun 13, 2016 at 5:42 AM, Christoph Becker wrote: > On 11.06.2016 at 01:37, Aaron Piotrowski wrote: >> I would like to propose a new iterable pseudo-type that accepts both arrays >> and objects implementing Traversable. Values accepted by iterable can then >> be used with foreach and yiel

[PHP-DEV] Re: [RFC] Iterable

2016-06-13 Thread Christoph Becker
On 11.06.2016 at 01:37, Aaron Piotrowski wrote: > I would like to propose a new iterable pseudo-type that accepts both arrays > and objects implementing Traversable. Values accepted by iterable can then be > used with foreach and yield from, or help to reduce type-checking logic in > general. >