Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114625 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17725 invoked from network); 26 May 2021 19:24:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 May 2021 19:24:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5E2FA1804B0 for ; Wed, 26 May 2021 12:36:03 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.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 ; Wed, 26 May 2021 12:36:02 -0700 (PDT) Received: by mail-qk1-f177.google.com with SMTP id 82so2248362qki.8 for ; Wed, 26 May 2021 12:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ReHS4vstoSeLbDKVhbP8rog4SKgDMu8d8FG2QRMfGXo=; b=1BX9UoQaUknojYo80ArjS+G2jtI2uqJJXsoTxHP86vJw0sbc4ESI/8kGBMDujTD43A 31isi0fX3E12lLU6dbQd3T9EJ41XrYRfy15OBxWrOY1zp35hSkuzDOJmVEb+xfnUun3f uX57TmWPCsnICl0Jg3xg+Fmivfs2rQ3cTZeQZIPb86OLjWBVXRWiyb47al1UgLKNsaIa hZm6fjDfZzXA9Gdk5qOTHCac3plQ1dEbY/QAkTHEUSlj6iFOeqHZ/IKL8wBwgdQBr+jy t44/LomAb0yVyQG8pwKqlh6ND2cawy+wmxsrNNu6QymEpM5bvOCxpsbsv2fHy0NRA8aN +CWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ReHS4vstoSeLbDKVhbP8rog4SKgDMu8d8FG2QRMfGXo=; b=kAMmqTUeY1XnLLSmUdPeDZngpMzhnYYuxOQX9qKb+fQKxrfoJzmc3jaEas30RJmwUJ mD/hg4Mya+BykOt0qjKdklZTm5Ito1NeHpy3rKCWSulP/OUyzViZL6qTNzo8dhfhST2R FesOp0UDVw2ClWZxi1VqRydyG80RMALzb+VfS0L4DfYY7scwobNJLDYRebXonYr03iKi y6724UpTRtBAHOr3XAwCadQDSsmvZe0sE1ToPxtau1zenvagkJstKFIFJnQ+rvhSi/xV ETGz/BE90x6qmfUb6T9wbGsMEoCthoy3njjH430r7/YUSJWWmoINArxWT1r+upHNvlRw 4fpw== X-Gm-Message-State: AOAM532cMzJlJPMZrtF5KiJ8oG48PDsbXRy3XIzwD2Y1rTdlGugpXIPN Hz41MribRXdaljOYmvDllYOHjA== X-Google-Smtp-Source: ABdhPJxsr1syxNrzTbZ4vXPV0P4kccYmRhPzSk+RM73ZPMvAYpjEXo5A959qfM5It+2IgOfTyoWDhA== X-Received: by 2002:ae9:e40b:: with SMTP id q11mr41557401qkc.101.1622057760279; Wed, 26 May 2021 12:36:00 -0700 (PDT) Received: from [192.168.1.10] (c-24-98-254-8.hsd1.ga.comcast.net. [24.98.254.8]) by smtp.gmail.com with ESMTPSA id 97sm2137235qte.20.2021.05.26.12.35.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 May 2021 12:35:59 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_65786917-E141-4F80-899A-7DF13C5609FD" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\)) Date: Wed, 26 May 2021 15:35:58 -0400 In-Reply-To: Cc: "internals@lists.php.net" To: Sara Golemon , Marco Pivetta References: X-Mailer: Apple Mail (2.3608.120.23.2.6) Subject: Re: [PHP-DEV] A little syntactic sugar on array_* function calls? From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_65786917-E141-4F80-899A-7DF13C5609FD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 26, 2021, at 2:34 PM, Sara Golemon wrote: >=20 > What I don't like about the specific proposal is that it's just a = little > too magic in its function selection and argument mapping. There's = also the > fact that it doesn't leave room to improve specifics about the > implementations of the methods. I'd much rather seen an `Array` class > defined with specific methods declared on it. =20 Wouldn't an `Array` class necessarily result in array-incompatible = pass-by-reference semantics, which is one of the same issues with = userland using ArrayObject as an array replacement? > On May 26, 2021, at 7:51 AM, Marco Pivetta wrote: >=20 > On Wed, May 26, 2021 at 1:03 PM Mike Schinkel > wrote: >=20 >=20 > > On May 25, 2021, at 6:28 PM, Iv=C3=A1n Arias > wrote: > >=20 > > Hi all, > >=20 > > It sounds like scalar objects by Nikita: = https://github.com/nikic/scalar_objects = >=20 > Yes, but Nikita wrote this note about technical limitations at the = bottom of the repo README: >=20 > Due to technical limitations, it is not possible to create mutable = APIs for primitive types. Modifying $self within the methods is not = possible (or rather, will have no effect, as you'd just be changing a = copy). >=20 > Sounds like a big **advantage**?=20 Yes, it is a big advantage. Except for when it is not. -Mike= --Apple-Mail=_65786917-E141-4F80-899A-7DF13C5609FD--