Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116852 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28664 invoked from network); 9 Jan 2022 18:09:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Jan 2022 18:09:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 72EA018053E for ; Sun, 9 Jan 2022 11:18:15 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_HOTMAIL_RCVD2, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8075 40.80.0.0/12 X-Spam-Virus: No X-Envelope-From: Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11olkn2053.outbound.protection.outlook.com [40.92.18.53]) (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 ; Sun, 9 Jan 2022 11:18:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ozp8llM55cYt83N+Ox4aABZ8v97DAkWs+Jbmvq9D+0R9xoR5kREeNznaYZp0c6yW6wo75LlRIYbUntOvtd7ta06EZuVSEus3tiz/Sv1XossQ3GuVxYT455bV7TKKaib+IgyMaXJDEDRbpV/k9trcdQ2XC4UkxQ0LPro8T3ZqFbKhPyJ9zAF2RnBNKE/BZQy+KnW2flE/ycePWavIDrutLsGEu11al4m9N4uWeeSRoAj5Y/JEpyK5e+abl6mJjQunGfXIvm5oAuhPJEKFIKzzYeqMUjO3LZ8PXKLOOtnu7Uz/c4e3EK2LAmmmuCCrrfkjnsaNRkJfbgqQCWQ35VarYQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OGrYutFGr/dgOgWyh1/nVA+VhFGIsElby+gDsNCOyy0=; b=KWbX5F7qfdy4IEOnJujjSvMiN21FOMsT918CT68c9G5e6qx7Hlh9XYuB6nDHdgTfCN1qNE3Gj3jkOiPT8YclL5PB7vM8pG6Mi/pehiQSTwbSZ3+8SInaUDOlcXP2RxBaAvMRSZ8YFtEySf4hZVuL4gRsUZ2y0KvszveeF4L3CmQ1RMCbx3mtE0j3SOq2Q3on7xmfCxsC/uezgkEx/XmTQQcuOmfTaBJJudcMv8ggnLm2dXuKOf+z5of33lOArj8Oa8HrOv4h3LtlFVS+u3SE0sc7qcbj/GbDwU/V4TYAjEPtyIK+OFJYd4iNHNcyLgV8mrlaoyYFbZYjQpiPCifRmA== 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=OGrYutFGr/dgOgWyh1/nVA+VhFGIsElby+gDsNCOyy0=; b=JRwoi2i4F414Cun5f+5180f0SWgBA9DAtXaJY+TxeXf+tfpb3wb3v/GrdHHa/t1dHmg2EyZULyCpxjzFEPBbjdeur2NF15F7LedMcdiCZNSHzfR/5T3jxVPRFvzDqj9+bVuK0OFA2io9Ju1ojSkjFxHugaHxKeR7euzjwYpPYeNDbBj+CGcmpX1uJbLqmBJLiV0oE1huFfMVu/Uk0aoGBlXLEuy0oKvuRWxTuiN0Mq+8B41hhU/bZve6OzuhEhl7AgKqeqGegjo1zrCLz5iVBCxT3Q6bVAX9SEefGlapa1OG+S/ziWhr0RxbmmN51Qg+8dqD/aoqGyVghCHH6Jy5wQ== Received: from DM6PR14MB4155.namprd14.prod.outlook.com (2603:10b6:5:21e::11) by DM6PR14MB2379.namprd14.prod.outlook.com (2603:10b6:5:ae::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.7; Sun, 9 Jan 2022 19:18:10 +0000 Received: from DM6PR14MB4155.namprd14.prod.outlook.com ([fe80::1ddb:6eeb:a96d:9846]) by DM6PR14MB4155.namprd14.prod.outlook.com ([fe80::1ddb:6eeb:a96d:9846%4]) with mapi id 15.20.4867.011; Sun, 9 Jan 2022 19:18:10 +0000 To: "internals@lists.php.net" Thread-Topic: (Planned) Straw poll: Naming pattern for `*Deque` Thread-Index: AQHXroS7YGugvAukqkKHqJ49b74ipqxbvCjU Date: Sun, 9 Jan 2022 19:18:10 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: c2108d43-9d7f-6cbd-6606-4f2fe7ee1e27 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [mdTpC1p3E7EC3Di8ONxR+mx6aeAAdP1Sg9UviEgS1cMX6l2SXSAjVx5TkgUaIf0api17909z6Is=] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f28c976b-2f1f-48c9-4a59-08d9d3a4c627 x-ms-traffictypediagnostic: DM6PR14MB2379:EE_ x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xCAVmF0OjZC8LoASD9HETshhQx9QcVda81mV+dIh0wfiUCIUUtC0pUPNnkwGrt5JFkUblHPz8NvduBehLuYSdJn2sIoh5AVOg03sFACBQuWQlR4AN6O0eDm4DrTrobgUMedbg5fenaz8004ellWMQwEzfzPGYKJglfBahD0DOjfP+mxZe9Q+S/1OVcr3DUCZLD0m0pzadVAHMBMSxR6fMrsKrE1PISZFzaPE2aKJvEJgVJV5p1Cz2A+2XkpQ/WjhGPG17axIOuOMr4etne8WzZWNlonehKJwsO3sFCeHNnzD25ZFChXnUKyj6DUcNkIKSMXnmMEdCoMC5BOg6TDUm48hWQP6pvTGHVrOo4fSy4pJWjlPUuc7DuIWYCoeXZAITIHSjcP/PIinUc7V3rZlKRblP9Nd1xVZo3pWUA79K0FdYP3YuI9pYEcpKfYJ23pFaxy7P2/C0hIj4FKMPBM5ajzvLqO8B2BlWaSdBiI1gjN+WixxtlKOhvQiJmwwOD/brGIRXVNYx42C3YLRYVf/reNgsoA41yif0M6qJuHXbMpZK2VwRNODGt/4sllVqRFn+FPsVFF92/YFk6Gu2m0/Z09EInWTS6vJB+KgkDdbeXdM4xQhD497TEcAiwfMxrCACeT73Zx/OeWkPEnh5xOr6p2OWrhAxPRhd2xjgh00aKM= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?o6Rb8/U21KAPUcuVz29V7BWcd9IdwwIcJ20isGAKHIwIJw5syIYwcDr4l1?= =?iso-8859-1?Q?MFX9yqU1kHPWxRigwyvz3fuyMdEDPtEwxBrg1Gh6Yff+0zMK1tzqKi+lsI?= =?iso-8859-1?Q?UF8SNUUwzGuBfOjhOoKKhPMuxqKHGsJ+Pen461v+70jyfg/HcwIXCCmpQK?= =?iso-8859-1?Q?KI1iWpaH86Ixxh0oRUZkF/difdbBxUGhuiYDhnuMqMK15JxyQMVhe25Qnn?= =?iso-8859-1?Q?VS6fZt7plKb5l5W35nsAzIFuFZqz/vijjsLjouSozw7CdgfNKPacR/n036?= =?iso-8859-1?Q?/3p3Gcl0VWxssBAsNCwKc0gfSeb8/qeH4yFIPXWEI6XZ34lrfJIBWzhKJg?= =?iso-8859-1?Q?zmIeorpVmtst5ROLWzWjf4OEEp69aS+WP6tEAZHYxc1q3qm5aKJVo95wHj?= =?iso-8859-1?Q?S5dDaAX7l80j+bf2CH/vilc5NkIB6MWzHkPy3yQkEVomNXpqJ1GeQPTGTw?= =?iso-8859-1?Q?rdn7wmzSY7EIjHGbjeAia56K16n7VjlX56aXY+hcYddNNDwMahlxu6bSJ7?= =?iso-8859-1?Q?vAxIEl7eMqRAJmplHIWBUmMg99VEpZ+KbjVLUQW+nkSXLowYB1/5wecN6x?= =?iso-8859-1?Q?9K3n1B1xS4pNyCkCXkSsCa/yrf6mAj9qLoW+koyczHX7jJNdmvigBTFb4Q?= =?iso-8859-1?Q?JWcdh5wGb+Zy1BhiU7mLeTXV0FvDTTNr8GxTm7cCUhpC+WgKMH/qZZ/RtZ?= =?iso-8859-1?Q?LEWo4uBWUWwW9Y5nyF9v0wQdNbUsCS38vw5xNmjmEnlx9cfWrOzunaQw3n?= =?iso-8859-1?Q?ldYEetUZcuZhHt3kAyNzxQBM48HUKEpbyzF1BuEJoPVx5PjM4nZug8NOSY?= =?iso-8859-1?Q?DpycVftrUtJIwvDqHPNPVkwkO5mpJ3kjR5kuVaW5wGozCAN0UIUGbjbNqK?= =?iso-8859-1?Q?5stjln799buNbKI/3NmOB/XauapbQCaFNnR00MB1Uo8X7L/qV7UczkJevz?= =?iso-8859-1?Q?20Y1aWB/1UYjsmhh03vCMz+NOtdAlVLBn2/dgxGYxWAotOCgJdbcwSm0dJ?= =?iso-8859-1?Q?6MnnV8hc/UbW9Qvoqv39lBddyhUMa4qT+vWx9f+kd6iFNcw6J/FiCZpU2a?= =?iso-8859-1?Q?5g=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-cd57b.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR14MB4155.namprd14.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: f28c976b-2f1f-48c9-4a59-08d9d3a4c627 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2022 19:18:10.1728 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted 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: DM6PR14MB2379 Subject: Re: (Planned) Straw poll: Naming pattern for `*Deque` From: tysonandre775@hotmail.com (tyson andre) Hi internals,=0A= =0A= > Because the naming choice for new datastructures is a question that has b= een asked many times,=0A= > I plan to create another straw poll (Single transferrable vote) on wiki.p= hp.net to gather feedback on the naming pattern to use for future additions= of datastructures to the SPL,=0A= > with the arguments for and against the naming pattern.=0A= > =0A= > https://wiki.php.net/rfc/namespaces_in_bundled_extensions recently passed= .=0A= > It permits using the same namespace that is already used in an extension,= =0A= > but offers guidance in choosing namespace names and allows for using name= spaces in new categories of functionality.=0A= > =0A= > The planned options are:=0A= > =0A= > 1. `\Deque`, the name currently used in the RFC/implementation. See https= ://wiki.php.net/rfc/deque#global_namespace=0A= > =0A= > =A0=A0 This was my preference because it was short, making it easy to rem= ember and convenient to use.=0A= > 2. `\SplDeque`, similar to datastructures added to the `Spl` in PHP 5.3.= =0A= > =0A= > =A0=A0 (I don't prefer that name because `SplDoublyLinkedList`, `SplStack= `, and `SplQueue` are subclasses of a doubly linked list with poor performa= nce,=0A= > =A0=A0 and this name would easily get confused with them. Also, historica= lly, none of the functionality with that naming pattern has been final.=0A= > =A0=A0 However, good documentation (e.g. suggesting `*Deque` instead wher= e possible in the manual) would make that less of an issue.)=0A= > =0A= > =A0=A0 See https://wiki.php.net/rfc/deque#lack_of_name_prefix (and argume= nts for https://externals.io/message/116100#116111)=0A= > 3. `\Collection\Deque` - the singular form is proposed because this might= grow long-term to contain not just collections,=0A= > =A0=A0 but also functionality related to collections in the future(e.g. h= elper classes for building classes=0A= > =A0=A0 (e.g. `ImmutableSequenceBuilder` for building an `ImmutableSequenc= e`), global functions, traits/interfaces,=0A= > =A0=A0 collections of static methods, etc.=0A= > =A0=A0 (especially since https://wiki.php.net/rfc/namespaces_in_bundled_e= xtensions prevents more than one level of namespaces)=0A= > =0A= > =A0=A0 Additionally, all existing extension names in php-src are singular= , not plural. https://github.com/php/php-src/tree/master/ext =0A= > =A0=A0 (Except for `sockets`, but that defines `socket_*` and `class Sock= et` and I'd assume it would be named `Socket\` anyway, the rfc didn't say e= xactly match?)=0A= > =0A= > =A0=A0 So the namespace's contents might not just be `Collections`, but r= ather all functionality related to a `Collection`)=0A= > =A0=A0 Also, the examples in the "namespaces in bundled extension" RFC we= re all singular=0A= > =0A= > =A0=A0 > For example, the `array_is_list()` function added in PHP 8.1 sho= uld indeed be called `array_is_list()`=0A= > =A0=A0 > and should not be introduced as `Array\is_list()` or similar.=0A= > =A0=A0 > Unless and until existing `array_*()` functions are aliased unde= r an Array\* namespace,=0A= > =A0=A0 > new additions should continue to be of the form `array_*()` to m= aintain horizontal consistency.=0A= >=0A= > **NOTE: This later was changed to `Collections\\`, I misread the names= paces in bundled extensions RFC, and sub-namespaces are allowed**=0A= > =0A= > =A0=A0 See https://wiki.php.net/rfc/deque#global_namespace (and https://e= xternals.io/message/116100#116111)=0A= > =0A= > =A0=A0 Also, straw polls for other categories of functionality (https://w= iki.php.net/rfc/cachediterable_straw_poll#namespace_choices) =0A= > =A0=A0 had shown interest of around half of voters in adopting namespaces= ,=0A= > =A0=A0 there was disagreement about the best namespace to use (e.g. none = that were preferred to the global namespace),=0A= > =A0=A0 making me hesitant to propose namespaces in any RFC. For an ordina= ry collection datastructure, the situation may be different.=0A= > =0A= > While there is considerable division in whether or not members of interna= ls want to adopt namespaces,=0A= > I hope that the final outcome of the poll will be accepted by members of = internals =0A= > as what the representative of the majority of the members of internals = =0A= > (from diverse backgrounds such as contributors/leaders of userland applic= ations/frameworks/composer libraries written in PHP,=0A= > documentation contributors, PECL authors, php-src maintainers, etc. (all = of which I expect are also end users of php))=0A= > want to use as a naming choice in future datastructure additions to PHP.= =0A= > (and I hope there is a clear majority)=0A= > =0A= > -----=0A= > =0A= > Are there any other suggestions to consider for namespaces to add to the = straw poll?=0A= > =0A= > Several suggestions that have been brought up in the past are forbidden b= y the accepted policy RFC (https://wiki.php.net/rfc/namespaces_in_bundled_e= xtensions)=0A= > and can't be used in an RFC.=0A= > =0A= > - `Spl\`, `Core\`, and `Standard\` are forbidden: "Because these extensio= ns combine a lot of unrelated or only tangentially related functionality, s= ymbols should not be namespaced under the `Core`, `Standard` or `Spl` names= paces.=0A= > =A0 Instead, these extensions should be considered as a collection of dif= ferent components, and should be namespaced according to these."=0A= > - More than one namespace component (`A\B\`) is forbidden=0A= > - Namespace names should follow CamelCase.=0A= =0A= The straw poll https://wiki.php.net/rfc/deque_straw_poll has been written, = and voting on the straw poll will be started on Wednesday, January 12th.=0A= =0A= The naming option was also changed to `Collections\` on reflection, as prop= osed in https://externals.io/message/116100#116119=0A= =0A= Are there any arguments for/against the naming choices that you'd like to s= ee in the straw poll?=0A= =0A= Thanks,=0A= Tyson=0A=