Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114578 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17043 invoked from network); 25 May 2021 10:11:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 May 2021 10:11:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F01081804D9 for ; Tue, 25 May 2021 03:22:18 -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, 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-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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, 25 May 2021 03:22:18 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id x8so31591190wrq.9 for ; Tue, 25 May 2021 03:22:18 -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=9RyKZwQipmxFUrBLdhSr/JptOEzwUO3Zsqt/3dK2LI8=; b=B3RSdI6eL6M1EJjzj3M0zcS6sm/8W3HZlWaKiunGnS1CyciXFD0IY/GJ1zV4P/cLHZ O56f8QUcdm4JJ3EgbLcWMX9ikzmCjLAvhwTH+HZvClsBYbf23uV5tU9RzjRnBqn59Mal rvSWBmrh/qhXVB5LRMjkB/3iqbDlGfRGq3pObNyJQZt4mxl8jOZdatoFZXBLfVBPzrUL HYs51VbTVw0DHGY0VPkKgpognKsuw6TftDz8urXMdkpjboKkFci980DXZkSfl1y6fhpg t9sId36ETa8AXru2zJdi+jkf9YgCeXOLlQmv8gbfXWpOnJIHyc2HiqULSZCr1BxKotuA iU4w== 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=9RyKZwQipmxFUrBLdhSr/JptOEzwUO3Zsqt/3dK2LI8=; b=ll/yBYLtjuVShxFWHpg5XQF/iOejn5MgNsjWR6GBZ3OyV2dvhIMQK+9vZn8Mu0Zif5 hIKRfyGh1Gf5vFDewo9mMLODP0eGy1PDMUtIZKc3o+9rFXzsLBtW7U8weOMW6VaOg2Rf xONZeEepnLliS6qpAJci/M2XZvuto0zaxd/khT4Gk/vOg3BmUwMf0YZAA1UnpR3tIx7J aRFY644/SSfkjJZbfBk+lAbL33z0OOoYDcTNLxHuLvmbTNbNIhZtmg0UoFyCy+LDzI/9 AZnE7V2GXk3DWEsaXE+WDrxTvEJQDlpehmJiQBM2vj4Tg8bAjsUEietEKwHt0bX9L+0d s4qg== X-Gm-Message-State: AOAM532yp7wtQSibllk/iWCEyj81Dcxzew7vfdFHUpsE7Gc0MoHnWZVz pN40OR/pQR3m7SdGLLp98ZDBFk0dOnK7OY5sObs= X-Google-Smtp-Source: ABdhPJxmuvz2DI5OFnEHPo22iOdJ+cHAv12M3x7V406V2vFOkY/AiWJzZQuZtwQFnueZzaU4DQvTmxL2g1WOqBNq1NU= X-Received: by 2002:adf:e589:: with SMTP id l9mr27459976wrm.361.1621938134988; Tue, 25 May 2021 03:22:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 25 May 2021 13:22:02 +0300 Message-ID: To: Lynn Cc: Karoly Negyesi , "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] A little syntactic sugar on array_* function calls? From: someniatko@gmail.com (someniatko) > The pipe operator feels like a poor solution while `->` would do exactly what people want. Could you elaborate? Adding method-like array access functions with only few predefined functions, and only for arrays looks very limited in scope, while the pipe operator would allow applying any existing function, be it internal or userland one, to any type of variable, not limited by arrays, having the same "fluent api" feel. Also it clearly distincts between object method calls and function application, which is a plus for clarity, IMO. I am also not sure who the "people" you refer to are, because, well, I am among the people using PHP daily, and I would personally prefer a more generic solution, which the Pipe Operator currently is. Best wishes, someniatko