Re: [PHP-DEV] Re: edit.php.net is down

2020-09-01 Thread Sergey Panteleev
Some social networks have changed the API, I started fixing, but there is still google and need to check Linkedin https://github.com/php/web-doc-editor/pull/19 wbr, Sergey Panteleev On 1 Sep 2020, 00:05 +0300, Haseeb A. Basil , wrote: > ok, that seems to be working now as well.

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread Nikita Popov
On Tue, Sep 1, 2020 at 1:56 AM tyson andre wrote: > Hi internals, > > I've created an RFC for https://wiki.php.net/rfc/any_all_on_iterable > > This was proposed 2 days ago in https://externals.io/message/111711 with > some interest > ("Proposal: Adding functions any(iterable $input, ?callable $cb

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread Lynn
On Tue, Sep 1, 2020 at 9:31 AM Nikita Popov wrote: > To be in line with naming conventions, I would suggest calling these > iter_any() and iter_all(), using iter_* as the prefix for our future > additions to the "functions that work on arbitrary iterables" space. > iterable_any() and iterable_all

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread Marco Pivetta
On Tue, Sep 1, 2020, 09:31 Nikita Popov wrote: > > To be in line with naming conventions, I would suggest calling these > iter_any() and iter_all(), using iter_* as the prefix for our future > additions to the "functions that work on arbitrary iterables" space. > iterable_any() and iterable_all()

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread Peter Bowyer
On Tue, 1 Sep 2020 at 08:59, Marco Pivetta wrote: > Did the namespaces ship sail forever? Can we just have those instead, > please? > To mix metaphors: it sailed, shot down in fiery flames. Unfortunately. Peter

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread Levi Morrison via internals
On Tue, Sep 1, 2020 at 2:08 AM Peter Bowyer wrote: > > On Tue, 1 Sep 2020 at 08:59, Marco Pivetta wrote: > > > Did the namespaces ship sail forever? Can we just have those instead, > > please? > > > > To mix metaphors: it sailed, shot down in fiery flames. > > Unfortunately. > > Peter If we add

Re: [PHP-DEV] Request for couple memory optimized array improvements

2020-09-01 Thread Josh Bruce
That’s interesting as I haven’t played with iterates and generators much. If the iterator can’t take an iterable, the idea of something like __toArray seems way more convenient: https://wiki.php.net/rfc/to-array Cheers, Josh > On Aug 31, 2020, at 4:39 PM, Michael Voříšek - ČVUT FEL > wrote:

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread Mark Randall
On 01/09/2020 16:05, Levi Morrison via internals wrote: Anyway, the key point I'm making is that I think a larger RFC has a better shot of passing if we want to namespace it. Try as we might 4 of us working together couldn't get namespaces accepted. I got the feeling that there seems to be an

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread Dik Takken
On 01-09-2020 09:30, Nikita Popov wrote: > To be in line with naming conventions, I would suggest calling these > iter_any() and iter_all(), using iter_* as the prefix for our future > additions to the "functions that work on arbitrary iterables" space. > iterable_any() and iterable_all() would wor

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread Dik Takken
On 01-09-2020 01:56, tyson andre wrote: > Hi internals, > > I've created an RFC for https://wiki.php.net/rfc/any_all_on_iterable Hi Andre, I like the RFC, it is small and the added value is clear. The RFC mentions the possibility of adding a first() method in the future. I think it would be grea

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread tyson andre
> Perhaps we could do the same thing by introducing an items() function > that takes an iterable and yields one array for each item in the > iterable. The arrays contain the key/value pairs. Quoting the example > Tyson gave: > >   any($itemMap, fn($enabled, $itemId) => $enabled && >   meetsAddition

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread tyson andre
Hi Mark Randall, > Try as we might 4 of us working together couldn't get namespaces > accepted. I got the feeling that there seems to be an opposition to them > on principle, rather than the merits or drawbacks of the RFCs. > > Various libraries do use statics for this: > > Iterators::all() M

Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables

2020-09-01 Thread tyson andre
Hi Lynn and Nikita, > To be in line with naming conventions, I would suggest calling these > iter_any() and iter_all(), using iter_* as the prefix for our future > additions to the "functions that work on arbitrary iterables" space. > iterable_any() and iterable_all() would work as well, though ar

Re: [PHP-DEV] Constructor parent property promotion

2020-09-01 Thread Mathieu Rochette
"Andreas Hennings" andr...@dqxtech.net – August 17, 2020 7:19 PM Interesting stuff! https://wiki.php.net/rfc/constructor_promotion I see this for the first time, bu

Re: [PHP-DEV] Constructor parent property promotion

2020-09-01 Thread Mathieu Rochette
On 8/17/20 7:14 PM, Lokrain wrote: On Mon, 17 Aug 2020 at 19:46, Mathieu Rochette wrote: Hi, I’m writing a message here to receive feedback on a two ideas related to class constructors before going more in details with an RFC. I hope this is appropriate behavior f

[PHP-DEV] Draft RFC: foreach iteration of keys without values

2020-09-01 Thread Mike Schinkel
This is a new thread for John Bafford's RFC which he mentioned on another thread, see below: https://wiki.php.net/rfc/foreach_void > On Aug 31, 2020, at 5:50 PM, John Bafford wrote: > > Hi Riikka, > >> On Aug 31, 2020, at 14:13, Riikka Kalliomäki >>

Re: [PHP-DEV] Proposal: Adding functions any(iterable $input, ?callable $cb = null, int $use_flags=0) and all(...)

2020-09-01 Thread Mike Schinkel
> On Aug 30, 2020, at 12:31 PM, tyson andre wrote: > > Hi Mike Schinkel, > >> Doesn't the occasional required use of long constant names like >> ARRAY_FILTER_USE_KEY and ARRAY_FILTER_USE_BOTH somewhat negative the benefit >> of a more concise syntax? >> >> I know that many existing function