Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108270 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 45732 invoked from network); 27 Jan 2020 17:00:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Jan 2020 17:00:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5424B1804F3 for ; Mon, 27 Jan 2020 07:10:10 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8075 40.64.0.0/10 X-Spam-Virus: No X-Envelope-From: Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10olkn2108.outbound.protection.outlook.com [40.92.41.108]) (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 ; Mon, 27 Jan 2020 07:10:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aJEFOECfpRH6fxuOmiuNATEq9loyayPuPJQ02D/PTBnpYU0P6id65+srksXn5NqC1UMADqXA4P5OXEzyOJjmjSo9k020Kigrqm321sPgUo1W9M3IW/lgLwUoC8lIMcvYm+tVJSaD32Cipj+qJV9eYlzusGn7gwqZ1UYad73h7b7cfLgX7HEkn2hEUpbBGSNW9a6CcXTIiRQ6A0Pmz5YOYDukWgEPeJv1Udwh8FhQEtQb2IbI+iL9bW3VDVGDfe26WkpmSxmhXyVyI8vgpS/RFzpg+ed6obPoORB5BnFu8b/GNt1A0YJBizSSRF6ANbHLd2DQ/JOi5WJ1wC1vQX3Usg== 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=hzeUHo61es8oixQxrpuB5+z1RcYgPVygJDGIgXh2OCc=; b=W7Dhkz7Gl21NyjTn6zCHIXRujjAgn45XMno0/wYfxoyVVqSap+YWreIZ8+TLn9Za7iwcSomRXK032zDGkdZXThlCWOkZTylUv+wBLjSvPoUQ3gml6HAxwjm9gYeuo+8KNCuSACnGD6Cs1shMl44AWQ0J/iyPH1Mqc1QcfkDJmTlZ/N93FQeJ9NiEzLWQ/XVnsDBu8hsgz3GUUCQxnnM3/f8nPg7iXNk28TiYwF33uZTMaCLKjOnjHPtMKCmZCgxzXq/vK/igthQWIHncyBpyypT1DKDdFzPFpDbKWnLOs9NYD5mH46vm5iXX7tCLpZtx6YcXZiGiqxmf4gudJ6EFqg== 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=hzeUHo61es8oixQxrpuB5+z1RcYgPVygJDGIgXh2OCc=; b=hYKAjZ0tcyUeCL6mK7oY8u9tknGv4vbgyeomNrTN+OvdPEp++ctThnD0yU0JCX9L4iCi5UYduAl1l0if4yB5ANnhWGbYh7NHIkub//aRXdtUO1pYcMUWt6weGvPs69ShaCKssB1tzH92U+rSqbHN2Q+hs727+oSEDGCfnTd34MmOaCIBlJn1Y+MfWKbEg6fHG4++VOJtaZHi/Qvz5Fexi3miwG7TzhdRvMZ28JGuRRFDBCs3w8h9R4ADpxWYZ4p81fHlXWzsznPshq3kWyqijDZQPwMVtRxo0HNucG5VzINvf7jAL4kWRHL/DJqcZtGofgOe93xunTKr3BfYVBm9rg== Received: from DM6NAM10FT022.eop-nam10.prod.protection.outlook.com (10.13.152.54) by DM6NAM10HT078.eop-nam10.prod.protection.outlook.com (10.13.152.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18; Mon, 27 Jan 2020 15:10:08 +0000 Received: from DM5PR07MB3067.namprd07.prod.outlook.com (10.13.152.51) by DM6NAM10FT022.mail.protection.outlook.com (10.13.152.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18 via Frontend Transport; Mon, 27 Jan 2020 15:10:08 +0000 Received: from DM5PR07MB3067.namprd07.prod.outlook.com ([fe80::29e3:53bf:163e:5beb]) by DM5PR07MB3067.namprd07.prod.outlook.com ([fe80::29e3:53bf:163e:5beb%3]) with mapi id 15.20.2665.026; Mon, 27 Jan 2020 15:10:08 +0000 To: Nicolas Grekas CC: "internals@lists.php.net" Thread-Topic: [PHP-DEV] Re: [RFC] "use global functions/consts" statement Thread-Index: AQHVwNgGtev425C1jEaW2/fYCDQJoKfqjUCogAA6vwCAABZSCIAF7qHQgAA+1YCAABKbIoAI/p4AgAAC2gCABEpcgIAAVS8W Date: Mon, 27 Jan 2020 15:10:08 +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: x-incomingtopheadermarker: OriginalChecksum:49CE1DDB9CFA18E66A19183187D162E8AD3A61B9C0A79D16545A6AD010DF136B;UpperCasedChecksum:F8C39B2DD7145ADD039A58C95D1E6D70B450ACD67989D8D031A19F1BF612C76D;SizeAsReceived:7796;Count:46 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [paCfSF8dRPwDIEvJogNqyFY5e38ez6DT] x-ms-publictraffictype: Email x-incomingheadercount: 46 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 9f034d20-45b1-460a-7430-08d7a33aff53 x-ms-traffictypediagnostic: DM6NAM10HT078: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: difcO/qQwpenoHezBnjq9RPx4CtzD9yr/C2aX8yELnrE0JBRw8YX0mjD1RtJoUgYiFDuS0ARSbt19NkVqBY4oUOYUdBd0+gHDQtHNa/WmJ4yOt1u9lMRVyAWr8gQ0sjXvda9A990bpyYarFz+9ce0qtEpAE8KAogGpxo1OMuTCR1EX8HboKqeWK2gU1jiy9tmHPKovzPzKsclk8aIE6ZnfA7E7RIdk5z3So0dV/F6yo= x-ms-exchange-antispam-messagedata: P0s1iolCqVXKV7a0HJpFjI9iPpa1dHCW6+cqZuiAea7X2wFvJbGB3oF55nbNwsLAJeIXgq2JEyyjO8vaaD4BsQW/VcDhFBnFRJ60SSSLJob5RwKpeQFBMdv5azGiU1pPomb41mwRFNBQN8JiBAi1GQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 9f034d20-45b1-460a-7430-08d7a33aff53 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2020 15:10:08.2324 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM10HT078 Subject: Re: [PHP-DEV] Re: [RFC] "use global functions/consts" statement From: tysonandre775@hotmail.com (tyson andre) > can we please discuss this alternative? In another reply, you link to htt= ps://wiki.php.net/rfc/use_global_elements#deprecate_the_fallback_to_the_roo= t_namespace_instead=0A= > =0A= > But this new proposal derived from Nikita's idea is different as it doesn= 't need to deprecate anything.=0A= =0A= I've added https://wiki.php.net/rfc/use_global_elements#add_setting_to_make= _all_name_lookups_global_instead_eg_declare_global_lookup_1 to the discussi= on notes for the RFC.=0A= =0A= https://wiki.php.net/rfc/use_global_elements is opt-in, and also doesn't ne= ed to deprecate anything. The link you mention=0A= is a different proposal that has deprecations for constants and functions.= =0A= =0A= > I'm not comfortable with having a 3-ways declare directive. Who will pick= which of the 3 and for what reason?=0A= > That's going to be a mess to review. If we're looking for a forward path,= there should be only one opt-in way: a boolean flag.=0A= =0A= I'm not sure what you mean by 3 ways. It's at most two, and a setting for g= lobal name lookup might become mutually exclusive (forbid using both settin= g names)=0A= =0A= https://wiki.php.net/rfc/use_global_elements is 1 way right now. `declare(f= unction_and_const_lookup=3D'global')`=0A= If anyone made a proposal for class names in the future, it would probably = be 2 way.=0A= =0A= > If we were to make such a change (hypothetically), the way I would view i= t=0A= > is "use new name resolution rules" or not, rather than a collection of=0A= > fine-grained options.=0A= =0A= As it understand it, "use new name resolution rules" (a single RFC for ever= ything, including class names)=0A= is a discussion on how name resolutions could be changed to measure interes= t and get arguments for/against,=0A= and not something being advanced as an RFC right now.=0A= =0A= > I think that's all we need to make all symbols resolve in the same way, k= nown at compile time.=0A= > =0A= > You mention this should be another RFC. But process-wise, I think it woul= d be better to vote only once on a specific topic, vs having several iterat= ions that undo previous RFCs before having a stable consensus.=0A= =0A= The issue with that is that there's no good way to set up a vote or poll fo= r that in the RFC structure.=0A= I'd see global_lookup=3D1 and function_and_const_lookup=3D'global' as being= significantly different in who would vote on them.=0A= The former requires a lot more refactoring and code changes to handle chang= es to class name resolution,=0A= compared to the code changes of just changing function and constant resolut= ion.=0A= The reason I'm not trying to make a secondary vote on this is similar to th= e reasons why "use function..." vs "declare()" was a bad idea to vote on in= a previous version of my RFC.=0A= =0A= And because changing resolution of class names has those drawbacks, I don't= plan to change direction within this RFC.=0A= =0A= > I don't think it's a good idea to resolve the question of "use global=0A= > functions" vs "declare" as a subsidiary vote. At least in my mind, those= =0A= > two options are significantly different, and this choice would affect bot= h=0A= > my overall opinion of the proposal and also the answer I would give on so= me=0A= > of the other voted question.=0A= =0A=