Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114888 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87731 invoked from network); 15 Jun 2021 14:02:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Jun 2021 14:02:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D6F071804F4 for ; Tue, 15 Jun 2021 07:18:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 15 Jun 2021 07:18:34 -0700 (PDT) Received: by mail-oi1-f177.google.com with SMTP id x196so18398662oif.10 for ; Tue, 15 Jun 2021 07:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0KqNvRRpnlh8V8LSJacS5bJbRfWbyNkovZJ39iBEc0I=; b=NE3mVOVLDdxApE6RPA5uoHVkpTvIWfyMiwZtSGgj03RXRh0YJ0PWEUUWlaDP2u40hs eRCmabuVh1hHzf3Frg4rsteuqhaTnrMBSqoxSI+YAK8AoTcZSCEJkUbKHxUxLRA7+EZ5 4gGSAxh66IV+gutwFmwZUUgs/u4ibkjI/Uj9Jf74oHqpo/w//qMbCAAHwKb1tprqfHBG 1vC8x3nOeyEbkniYRu5QOBzJcEvTfoiGsMeKEYngIzIJCXxy7qJ1vCq07k6UtFKA2zms zSJCb8VWitjU+uFaaiPScm+tvn+7qTc5bonl+Mp4woPvxS472q122LZ8L1xnqg1XKTEk fZGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0KqNvRRpnlh8V8LSJacS5bJbRfWbyNkovZJ39iBEc0I=; b=O6yfJjxgB6sj2sZG2kAj+B8TrA08iuqH2OyaOlmHz39UiUFkU5f+rLmXJRhT6cgYzP /Ym6lVPz2Ydbmi1Ne6nG4XlfGSth8U4uUUL4g2MLUADyFseh3vigE7Mp0Zs2gNOHnn2z a/TVA1ff/SpjTQbOvgBso5/NApQgU/FM0sXhtR5w2uFHXyuldDjGduLb1YrV3nJoDheI cwXE1Bh9dBBG9NbSq6wbZAuu9sXS69hIY/1zX7rL9tWNOAvD2+9iiKbb9BbTTJiggyDp yxFCFcKblE5y+MW45ftA7Mvt4y2R3rrm2zKuR0UighOrTa1S9nXc+/zGJD/ldZsBk3Nl AH0Q== X-Gm-Message-State: AOAM531VUfQ/4pXUZlGaUN7GiDmhp/iCT6kRPLbFZSAIvVB0rWnAVgHb mlX9KU2lIpl7yBpW6zUvKZDKlt3ydremlfw9NGA= X-Google-Smtp-Source: ABdhPJyO9Jmpk90ZIdC3A9gMCSTwL7jwnx6Z24Ii+V8SKr6Mu1Tenmh3EFai+IkPSr6v/AlmsnJqy616qBeQVDRHm9A= X-Received: by 2002:aca:4143:: with SMTP id o64mr14288719oia.105.1623766711383; Tue, 15 Jun 2021 07:18:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 15 Jun 2021 16:18:19 +0200 Message-ID: To: tyson andre Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="00000000000007b97805c4cea620" Subject: Re: [PHP-DEV] [VOTE] ImmutableIterable (immutable, rewindable, allows any key&repeating keys) From: ocramius@gmail.com (Marco Pivetta) --00000000000007b97805c4cea620 Content-Type: text/plain; charset="UTF-8" Hey Tyson, On Tue, Jun 15, 2021 at 4:01 PM tyson andre wrote: > Hi internals, > > Voting has started on the ImmutableIterable RFC > https://wiki.php.net/rfc/cachediterable > > Previous discussion can be found in https://externals.io/message/114834 > > Recent changes: > - The name was renamed to `ImmutableIterable` to indicate that it cannot > be changed after being constructed. > It was brought up in previous discussions that the previous name of > `CachedIterable` could easily be assumed to have functionality similar to > on-demand iterators/iterables such as https://php.net/cachingiterator > (Additionally, immutability is rare among spl data structures) > - `__set_state` was added > I see the RFC as valuable but: * `__serialize` and `__unserialize` are out of scope: this depends on the contents of it, and there's no point in implementing them * `__set_state` should also not be implemented: `var_export()` like any other object and it should be fine * `jsonSerialize` also depends on the contents, and shouldn't be exposed All of this is not part of what should be in a reusable iterator. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --00000000000007b97805c4cea620--