Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114603 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13395 invoked from network); 25 May 2021 22:17:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 May 2021 22:17:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6937F1804CC for ; Tue, 25 May 2021 15:28:53 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068035.outbound.protection.outlook.com [40.92.68.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 25 May 2021 15:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IqLQiJ1fLOogwI4irPmnbANwUDkkcAK9Izj6EBdKdbny9h4Aw3N+Zm1HGSx0h6V2oAuVoGP+vifQfeqixeca8DyNdFgCJUDwmokQeHnN4L5RfXo/fjuZcqbNF4Qht3iJ5SlIYsv7M9NWd3Ns85u8Oy8UfVDDM43TaJBXcb+GLtCFF6FeCkQeybKCDvu5dEa/DGtXGPC2ZfLoD6WvOHp7HbvMBRH1VrIMmQtfefXE+ObLl3u9mR1a53U/nmhWnm/pxXuaw1snd78GP3lcpecjBn0+hm1LNKLC/wyZEo7HCO8Gfg+sAJWFB4bMemX1thcJAJQBYqdH+uFFobmb9Na8dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E9cEUzGXZkHgZpEkLbatpgu47BJEZH2/R/HnCNTutZQ=; b=khw8pVK3hbm1hcX6ovCe47CWdeOr670e4FJPYWVze3LWEuJUIpRD5U6h24+Ox5bprP5ZxQoG0SAbu6oBRMTkTX0B5YuLl/TgmHoQGodu9wPtOfIddQQWlQ6Rp6vbI6ilA9LIvkQ4SjPTMAg001+XjWGwM+21kvu23akfrUICeTGjz5nK1zRnC+gCEQl89P7ym6owCViGxHlfbV3+q4LfXpznGd95mbXCK+0P0/gVlU+wqLsiJ50o/Xrg0nqAqSRmgrkJAjZzIRtr11V1iIUlcN4wcPqGdCHCWHsSccpnNSHG+t/a2WtF8BzU39h6j6mMIZMKYvhx9TSbqkmAraFPEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E9cEUzGXZkHgZpEkLbatpgu47BJEZH2/R/HnCNTutZQ=; b=uKreA1KyVu56aUzSXaFAiDjeYiDhJtFqFt1UiqQmkIMB0JqUwAqD2uASDhCswjVeRtzLoynyc8glzCOmCG+LXZwLXpWzLG0sTj/qOm6QZ12yMoTDAZqZUE2+3yU84NhrNV/Gv1cjoqiBh/EdcEI37EmzxQIAfp4CkNMD9uJvWfeTf9UdyHJdn/FhYXqFGUBD+a7hUF8leXpTgfKRBfgyb0egSwJlR81mySuNjAbUD7vjxoT0lH38NdoTMBcCNirLpOCc8SkiIjvURAonOVd78Ed/TF54zAbKM4V/kxGBRNubo1SVrMyPonuk641DuYsa2h7sQdykkBbCKYDP8QBpMQ== Received: from AM5EUR02FT038.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1c::4e) by AM5EUR02HT088.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1c::300) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Tue, 25 May 2021 22:28:47 +0000 Received: from PA4PR02MB6800.eurprd02.prod.outlook.com (2a01:111:e400:7e1c::53) by AM5EUR02FT038.mail.protection.outlook.com (2a01:111:e400:7e1c::268) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Tue, 25 May 2021 22:28:47 +0000 Received: from PA4PR02MB6800.eurprd02.prod.outlook.com ([fe80::d4ae:5758:6afc:6462]) by PA4PR02MB6800.eurprd02.prod.outlook.com ([fe80::d4ae:5758:6afc:6462%3]) with mapi id 15.20.4173.021; Tue, 25 May 2021 22:28:47 +0000 To: someniatko , Hendra Gunawan CC: Karoly Negyesi , Marco Pivetta , Lynn , "internals@lists.php.net" Thread-Topic: [PHP-DEV] A little syntactic sugar on array_* function calls? Thread-Index: AQHXUUdIiefdwkIkzUiabtyTP62bPKrz+EkAgAABRoCAAAN9AIAABTGAgAAC+gCAAKm7AIAAGLaT Date: Tue, 25 May 2021 22:28:46 +0000 Message-ID: References: , In-Reply-To: Accept-Language: es-ES, en-US Content-Language: es-ES X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:96A76041666AEDABA130EDFA20B5968FAC80FBFE004D9154E93C1DFB3420477C;UpperCasedChecksum:0A593ED91F90D89793F0F887E897C42AE27D435B5CB60D5955C5B1BB77C981F9;SizeAsReceived:7561;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [gXSaT6QnH4QuIJ1TB83yt9CFSsp64YU7] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 2ebc38a3-2b0f-496e-7f1b-08d91fcc766c x-ms-traffictypediagnostic: AM5EUR02HT088: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WmPSbbhg7i6UPmjmxzCzg7Bbmc9WWKj0Y1LtiB00z5GQ4WimX0vd2ty4s54En7ZIu6K6a4IxUs1hiWsd9OY8oIzcqlvCxIbL+ub8lTSA0RqJM0EORXpTM0FeQW+GUcjsIXYjDiZ1e6QOZ9OJCer6Uc6yO/X8mb+KWvJOxDZpOv20ft5WDWULhz3QjvAlivQcQh1gJAWUy+yoDW7LLuxcILmNNk/EVFwyu0UJOC0aH5mR4hw8i5YlEoIYiFmU1k1y/lcXWLDQ29RrU4Pp2LoCUepsVLi8vEKumKcPTWhCsGAFpZCTw9d5uljNP+Q0c4mI0tYut5vGxWgVtXUuzdMepdgEv2uA9WAS/zWbEh9uJtV62bXRP2T5R2Nm/a6LXvAjxSVRkvqhfFO0AqJGTSghQqHwpoNvJAeIXE0aoTTeWh9tb9vqyFHwcbLdhcs+yDIC3zvx7mP0wlI6+UFhGyIXEw== x-ms-exchange-antispam-messagedata: TO31bTcJD8CMeu07Qx9FpscfTgmskY7Ptmg/weYNbWzo5IDzAwG1M2TU9UzetyfDEhba8RdrJ/h8k6RX6YhpxR0u8GAshI4rIHCWcY+PdUVr3N+rxc0XjuXlw5Q/VOmL2Q6NJ7eK4Ll4V4eK4Bbabw== x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_PA4PR02MB68005CAC217AD3B0EAB5DCE7B8259PA4PR02MB6800eurp_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: AM5EUR02FT038.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 2ebc38a3-2b0f-496e-7f1b-08d91fcc766c X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2021 22:28:46.8932 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT088 Subject: Re: [PHP-DEV] A little syntactic sugar on array_* function calls? From: txigreman@hotmail.com (=?iso-8859-1?Q?Iv=E1n_Arias?=) --_000_PA4PR02MB68005CAC217AD3B0EAB5DCE7B8259PA4PR02MB6800eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, It sounds like scalar objects by Nikita: https://github.com/nikic/scalar_objects Regards, Iv=E1n Arias. Get Outlook for Android ________________________________ From: Hendra Gunawan Sent: Tuesday, May 25, 2021 10:58:46 PM To: someniatko Cc: Karoly Negyesi ; Marco Pivetta = ; Lynn ; internals@lists.php.net Subject: Re: [PHP-DEV] A little syntactic sugar on array_* function calls? Hello. > > ```php > $array|>map($fn1, ?)|>filter(?, $fn2); > $array->map($fn1)->filter($fn2); > ``` > Whitespace removal is not a solution for code length problems. You might have a new problem if you do it. "|" is very similar to the lowercase "L" and uppercase "i". It's just an extra 3 characters (", ?" or "?, "). For most people, this is not a problem at all. people tend to write "one statement per line" rather than "multi statement line". I myself usually write no more than 3 statements per line if they are less than 120 characters. The real problem is there is no consistency for "haystack vs needle" position. There are RFCs to fix this (along with the naming convention problem), but none of them are successful. > The pipe operator feels like a poor solution while "->" would do > exactly what people want. Not so poor if we * use "~>" as pipe operator rather than "|>" * redesign the api under their proper namespace and strictly place the "haystack" as the first function argument. Regards, Hendra Gunawan. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php --_000_PA4PR02MB68005CAC217AD3B0EAB5DCE7B8259PA4PR02MB6800eurp_--