Hi!
A few weeks ago I resurrected a two year old proposal for adding two array
functions, namely array_every() and array_some(), modelled after their
JavaScript equivalent.
https://github.com/php/php-src/pull/1385
The most notable comment was that it would be nice to support Traversable
as well
On 15/07/15 13:28, Tjerk Meesters wrote:
> Hi!
>
> A few weeks ago I resurrected a two year old proposal for adding two array
> functions, namely array_every() and array_some(), modelled after their
> JavaScript equivalent.
>
> https://github.com/php/php-src/pull/1385
>
> ...
>
> Let me know wh
Hi,
On Wed, 2015-07-15 at 11:28 +, Tjerk Meesters wrote:
> The most notable comment was that it would be nice to support Traversable
> as well as arrays; instead of only supporting this for my own functions,
> I've generalised this so that other functions can take advantage of this as
> well.
On Wed, Jul 15, 2015 at 3:43 PM, Johannes Schlüter
wrote:
> Hi,
>
> On Wed, 2015-07-15 at 11:28 +, Tjerk Meesters wrote:
> > The most notable comment was that it would be nice to support Traversable
> > as well as arrays; instead of only supporting this for my own functions,
> > I've generali
On Wed, Jul 15, 2015 at 8:31 AM, Julien Pauli wrote:
> On Wed, Jul 15, 2015 at 3:43 PM, Johannes Schlüter
> wrote:
>
>> Hi,
>>
>> On Wed, 2015-07-15 at 11:28 +, Tjerk Meesters wrote:
>> > The most notable comment was that it would be nice to support Traversable
>> > as well as arrays; instead
On 15 July 2015 20:39:05 GMT+01:00, Levi Morrison wrote:
>Do note that the union types RFC would also alleviate some of this
>pain for user-land functions, since `array | Traversable` would cover
>the required access pattern. I think this is a superior approach
>myself, but I may be a bit biased a
On Wed, Jul 15, 2015 at 9:53 PM, Rowan Collins
wrote:
> On 15 July 2015 20:39:05 GMT+01:00, Levi Morrison wrote:
> >Do note that the union types RFC would also alleviate some of this
> >pain for user-land functions, since `array | Traversable` would cover
> >the required access pattern. I think
Benjamin Eberlei wrote on 15/07/2015 21:19:
On Wed, Jul 15, 2015 at 9:53 PM, Rowan Collins
mailto:rowan.coll...@gmail.com>> wrote:
On 15 July 2015 20:39:05 GMT+01:00, Levi Morrison mailto:le...@php.net>> wrote:
>Do note that the union types RFC would also alleviate some of this
>
On 16/07/15 11:26, Rowan Collins wrote:
> Benjamin Eberlei wrote on 15/07/2015 21:19:
>>
>> But instanceof and anything related to Reflection or get_class or
>> relevant code will fail on array.
>
>
> Ah, yes, I hadn't thought of reflection type things. I don't think
> instanceof would be a probl
Hi!
On Thu, Jul 16, 2015 at 6:39 PM Michael Wallner wrote:
> On 16/07/15 11:26, Rowan Collins wrote:
> > Benjamin Eberlei wrote on 15/07/2015 21:19:
> >>
> >> But instanceof and anything related to Reflection or get_class or
> >> relevant code will fail on array.
> >
> >
> > Ah, yes, I hadn't tho
On Thu, Jul 16, 2015 at 4:38 AM, Michael Wallner wrote:
> On 16/07/15 11:26, Rowan Collins wrote:
>> Benjamin Eberlei wrote on 15/07/2015 21:19:
>>>
>>> But instanceof and anything related to Reflection or get_class or
>>> relevant code will fail on array.
>>
>>
>> Ah, yes, I hadn't thought of ref
Levi Morrison wrote on 16/07/2015 16:23:
People have talked about creating types like so:
type Iterable = array | Traversable;
which could then be used as normal:
function foo(Iterable $f);
I kind of like this idea.
Why special case a pseudo-type if we can have a generic
way of making the
On Thu, Jul 16, 2015 at 9:42 AM, Rowan Collins wrote:
> Levi Morrison wrote on 16/07/2015 16:23:
>
>> People have talked about creating types like so:
>>
>> type Iterable = array | Traversable;
>>
>> which could then be used as normal:
>>
>> function foo(Iterable $f);
>
>
> I kind of like this ide
13 matches
Mail list logo