Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114627 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26690 invoked from network); 26 May 2021 21:20:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 May 2021 21:20:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 84851180501 for ; Wed, 26 May 2021 14:31:57 -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.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 14:31:57 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id 131so3590855ljj.3 for ; Wed, 26 May 2021 14:31:57 -0700 (PDT) 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=WPR1sgw+WmDjTygsQXJOqD58/FpICIR2sxEDGJoL5Cs=; b=qtzBWByCJMzsDacysvifLj0JTyZw7s6uOwqgcdXOPLc9fv6YDTmPigzdV7r/Q+72jh QFzt62IA8/6NejcQVQF6w8KKCfIbaMr7MRgL24UWuEO5XKsg6xREnLAQMnWWbrgtbE2B Mns+pwXBTByI0j9zcDau04rSpX/5HIDpiq3whqFpfRhCkQ/OrPZ/suFvfzP1aW7TBQzd wNxmzXzuWne2Ge4x5AJ19VEmkYedBi0wu6CZiVsdEJNMtQIJHux9lSO6nozCgFbD9eoh Ep1PDTlbGiF38fTpO/mnSwUOVEdjlH1ZSHOp7q1q6MYOCXUT7U7Lh2QbpTNnxZYmfwEy Fb5Q== X-Gm-Message-State: AOAM533G1AGajTSizQR8QZ4cepCqjPuaMP35a/JonAO3qRonuaANxfO6 g/q2uvXbz27EVj1NqPbZKgLYqjDdVKGLa3DkDyiP/XZA9XLxXg== X-Google-Smtp-Source: ABdhPJwIk8zA7wo1Y5KTkWBN5YRtcqyY0hHHs237Wgh0wYGLiV2l2Ce2VcvQFLwWZYxZmVer3sCaq/FAC217xvvY4zw= X-Received: by 2002:a2e:9759:: with SMTP id f25mr84439ljj.304.1622064714700; Wed, 26 May 2021 14:31:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 26 May 2021 16:31:43 -0500 Message-ID: To: Mike Schinkel Cc: Marco Pivetta , "internals@lists.php.net" Content-Type: multipart/alternative; boundary="0000000000001f6deb05c3425f41" Subject: Re: [PHP-DEV] A little syntactic sugar on array_* function calls? From: pollita@php.net (Sara Golemon) --0000000000001f6deb05c3425f41 Content-Type: text/plain; charset="UTF-8" On Wed, May 26, 2021 at 2:36 PM Mike Schinkel wrote: > On May 26, 2021, at 2:34 PM, Sara Golemon wrote: > > > 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. > > > 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? > > It would if the Array objects got returned. I'm instead picturing an instance that magically comes into being solely for the duration of the method call. Once the method returns, the object vanishes. -Sara --0000000000001f6deb05c3425f41--