Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114929 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63252 invoked from network); 17 Jun 2021 13:36:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jun 2021 13:36:32 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7BEA11804C0 for ; Thu, 17 Jun 2021 06:53:33 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 17 Jun 2021 06:53:32 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 2C30D134E for ; Thu, 17 Jun 2021 09:53:32 -0400 (EDT) Received: from imap8 ([10.202.2.58]) by compute3.internal (MEProxy); Thu, 17 Jun 2021 09:53:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=RKAfqp XSG34cnmJLXKyYJWsh16Qw3d6iDb1nxPGtsAE=; b=s3lzeTseCXuH3QPS9Kuo4f /JICz1urFvfyhJtmNmFzynHNrbCDeaZ1J3SeZSz6lJ49H8rEhoaXN2EsvQZr1DIt Qy5wZR9tRcDMaEOhQqR2MPpz0XvMcvbSNVSHAbBmUxRsIJM5d5jqMB56d8UGfwqE LSHW38Fo4+Y8NCFprbQNjyl99Kz2Uu+auL+PZZ+VLjcjFCoqe0RPlKzBG7eTtCgD wX4pKBhxAvrj1GVdQ6zTh/DP+QdYM046B6O6cIoLwbCyHP9bQvq9ntKWRBmhstlb hjLbdpUUyEkOkGNMBF/h+ujFWskCE/MI3j+u9kaT4ykfDg2bGLNFqTNXkNZYzPSg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeefuddgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeelhfejudeugedugefhhedugfdvfeelffefueetveeu tdejffekteekieevjeekgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 786313A0430; Thu, 17 Jun 2021 09:53:31 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-526-gf020ecf851-fm-20210616.001-gf020ecf8 Mime-Version: 1.0 Message-ID: <80e8d639-35ff-462b-a6b0-6a2decca8b96@www.fastmail.com> In-Reply-To: References: Date: Thu, 17 Jun 2021 08:52:17 -0500 To: "php internals" Content-Type: text/plain Subject: =?UTF-8?Q?Re:_[PHP-DEV]_[VOTE]_ImmutableIterable_(immutable,_rewindable,?= =?UTF-8?Q?_allows_any_key&repeating_keys)?= From: larry@garfieldtech.com ("Larry Garfield") On Wed, Jun 16, 2021, at 12:09 PM, Levi Morrison via internals wrote: > > Over half of the objections are to functionality, over half to unspecified reasons, > > I support people choosing not to directly respond with their > unspecified reasons, but if anyone is open to sharing I would > appreciate them doing so. I agree with Nikita that the concept is > useful, and with some refinement it could be more acceptable to > voters. If we know more about these "unspecified reasons" then perhaps > we can improve something for them as well. > > A guess: they don't really want unproven data structures going into > core, well, because you see the state of some (many) of the SPL data > structures. While I like the idea of an immutable collection, and the performance boost seems useful, this proposal seems to go about it in a sloppy way. 1) Iterable doesn't seem like the right "family" for this. It is iterable, but so are lots of other things. 2) I... have never seen anyone in PHP use "pairs" as a concept. I have no idea what they're doing here. 3) The JsonSerialize seems out of place. It may make sense from another angle, but it just sorta appears out of nowhere here. It almost feels like what you actually want is an immutable Dictionary class. Such would naturally be iterable, countable, serializing makes some sense, a fromIterable() method would make sense, etc. That I could get behind, potentially, although it also runs into the exciting question of type restrictions and thus generics, which is where list type discussions go to die. :-) So it's not the concept I'm against; the angle of attack here feels sloppy and coming at the problem from the wrong angle. --Larry Garfield