Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108305 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2634 invoked from network); 29 Jan 2020 03:13:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jan 2020 03:13:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2DD261804AC for ; Tue, 28 Jan 2020 17:23:52 -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 NAM04-CO1-obe.outbound.protection.outlook.com (mail-oln040092010047.outbound.protection.outlook.com [40.92.10.47]) (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, 28 Jan 2020 17:23:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fZ652lqMDQfbot7QSU99YHxQ2l9YOUvFBwi2BgijzCj5AexuDlaNI8ufbwWzEXhEz5aAjwD4N+j5XfVApSwTJRt8AQwm9GtXnFdkoT6uoujmLWcWnsCnI5TpDBo/fgz8MeFjHyYCX2CNLo0zlgeiR3GAh9EYKUce0ci6uN6jSDxMy6N+3uBKJwh+FxNfggUKAJat7KGkOIW4NZck98yHIgMyfHoW3V0Cfe9CJKxX3NAutXZ/72H0ubGNZXahjm6Wj1INTcj0UriY53Bbm4+ntpLYuDS+YX5xKMzFyh71GN2y7qg3OYP2jS6Suj0rKWLUJDC7KyPnGE0pFccdUL/dhg== 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=8tEdLQ7iyQlixQSt4UqtwHAaTlOD9tBrma27P3Ck8SE=; b=Dihf+ZRhABCKOMzBzVuO9b5UO4E8SE/NRri/3c6dUnyoRYd2Bv3n9FQn5Xc8EEBWP0NaOk7J0arNUYpMu2E3sQBKl6D1fD8A/mvGJIRdC8iBmDzJ8QUym/5FbDjk3FhneQEsvKUm6Z+Ho2lUY1cO3AMLpSbj1VdpEfRpjkSK63LGtW6n0Luu6hBsFne2VtaIEI8FNpnDgT9qSsc1TSJBa8rAYWHO8R+KpeuMhxvgrgy0ooC+1ySFxa89D8RQs/USsOTdS/0OFQzi6xw92nAKS8tR2AMMnusuEW32/eRBXRcYJAiTwZuePmYilGgDXnowmHmRgdOO0cHqZHk1xkxbOg== 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=8tEdLQ7iyQlixQSt4UqtwHAaTlOD9tBrma27P3Ck8SE=; b=uE8jbWHEpE4DKHWidMXK4Jezaay75pLAZ160G8vqdaJOLDn3B1lfWJLXZ9I1NmPFSszd8IigDdQY3kWbRKb13RZ8xh+DHBrIkfU7iII1PxhvNBGgQPJSpJBl8znqFtHgu3DZdxvqJYzlkQArltDIxUrnX2MrCnD4HXILAOzk3li8ySfi3BWvvBfLhAr6WnmriO2DAHuLw5esIxWu2ZJoJEuTkToaSvEB2d5oIMXQP8kqcWw2f6DTqrhELWLgLmYU+ApGWqapBDvlsSl2DZ22UNKRvNIBtVAuErXI9zBi+7k+qSsOqcdTUjN9oUhY4od5OHhK+oETJ5E6UtdMIAf+Fg== Received: from SN1NAM04FT038.eop-NAM04.prod.protection.outlook.com (10.152.88.53) by SN1NAM04HT211.eop-NAM04.prod.protection.outlook.com (10.152.88.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18; Wed, 29 Jan 2020 01:23:49 +0000 Received: from DM5PR07MB3067.namprd07.prod.outlook.com (10.152.88.56) by SN1NAM04FT038.mail.protection.outlook.com (10.152.89.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18 via Frontend Transport; Wed, 29 Jan 2020 01:23:49 +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.027; Wed, 29 Jan 2020 01:23:49 +0000 To: Rowan Tommins , "internals@lists.php.net" Thread-Topic: [PHP-DEV] [RFC] "use global functions/consts" statement Thread-Index: AQHV1IfBuqjWnIu9lEWrxlRKvYFij6f9dXecgADKhQCAAFMdqIAAWbgAgABUv12AAInJAIAAbhnXgAAYmgCAABHelIAACwEAgABtAwg= Date: Wed, 29 Jan 2020 01:23:49 +0000 Message-ID: References: <2d50c8c0-cbd1-0a0e-4098-eb00facf86db@gmail.com> , In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:55CFE7AB3F6599DE2376BA88CF9462FEB346FEC9F298ABF323389E3A2B8A6D93;UpperCasedChecksum:376F0D5BD8C77E02BC2D924915A093BD8FD0DC4EC4BEA20E3A0205897097B125;SizeAsReceived:8316;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [plGKrFUnflk3rdiN3NW5o9LkDMKmmg9I] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 2a1dcdf2-575b-42de-d239-08d7a459e4c2 x-ms-traffictypediagnostic: SN1NAM04HT211: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PzZLiEE/lveUnGkc92qv18YBZXbTnqMj5zRrI67WEtr40KdcxkLtbh4/fgLcyENvK9QybNHUFkzsjevBdVZsdcGlklDkThK5S3UrL7YN7sbm0QOuI29rvkzU+f9sFzF0WDw00QFZER/fncFuJ7LyPpa/ou89EIBCn/fOH/FELfezmJaPRtD5tfesDVfRTR6B68Qi7ZMnir5n1BiS0kzYxALpzGAX7tMNkzDZxeBJ+bQ= x-ms-exchange-antispam-messagedata: P0puK0CZg73yvj54SnAYzib5gqxHZgilIcZTdvF48+h3MeDd8xJIkRVHaWr/6eYQQJdoYpmXfIr1IKCTbQAzu/c+GgBjpZd7fwTNsIWREDPrlJL1cqtrMatm0a4Woo1Uu9GcYyLrDZqL3fAC5ZMTvw== 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: 2a1dcdf2-575b-42de-d239-08d7a459e4c2 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2020 01:23:49.2842 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM04HT211 Subject: Re: [PHP-DEV] [RFC] "use global functions/consts" statement From: tysonandre775@hotmail.com (tyson andre) > > That's more of an objection to 'global' than an argument about 'fallbac= k'=0A= > > or 'default'.=0A= > > It isn't suggesting a name to use instead of 'global'.=0A= > >=0A= >=0A= >=0A= > No, it's saying that whatever name you use, the guarantees of behaviour a= re=0A= > only as strong or weak as decisions we make in the future about Backwards= =0A= > Compatibility. That's no more or less true for one mode than the other,= =0A= > regardless of what we call them.=0A= >=0A= > > Any changes I don't expect to strict_types or function_and_const_lookup= =0A= > > would be discussed in the RFCs proposing those changes.=0A= > >=0A= >=0A= > Yes, and that includes changes to how 'fallback' mode works.=0A= =0A= I've decided against proposing 'fallback',=0A= so I'm not planning to work out how a future 'fallback' would work.=0A= =0A= I don't have anything to add for what I want 'global' to mean.=0A= =0A= > For allowing a particular cast with strict_types=3D1,=0A= > only strict_types=3D1 would probably need to be changed to keep backwards= =0A= > compatibility,=0A= > since code without TypeErrors would continue to work.=0A= >=0A= =0A= OK, bad example; what if we make the rules around int->float coercion=0A= stricter? The point is, why is a breaking change to mode 1 fundamentally=0A= different from a breaking change to mode 0?=0A= =0A= If 'fallback' and 'default' ever mean different things,=0A= > we'll very likely need to add 'default' again if namespace-scoped declare= s=0A= > become a thing.=0A= >=0A= =0A= > I still don't understand why you would ever want that. Perhaps it would= =0A= > help to think about specific examples:=0A= =0A= If a future language change changed the *default* resolution rules for func= tions or constants,=0A= I'd rather have future maintainers make the decision on whether to add a 'f= allback' to make migration=0A= than on whether to remove the 'fallback' if it didn't make sense to support= it.=0A= =0A= We have different values and expectations on what's likely to happen in the= future of the language.=0A= =0A= > Can you provide an example of when you'd want to use 'default' instead of= =0A= > specifying the mode you've written the file to run in?=0A= >=0A= > > There are large numbers of settings with values of 'standard'/'default'= =0A= > > that became problems.=0A= > > There are large numbers of settings with values of 'standard'/'default'= =0A= > > that made perfect sense=0A= > > and didn't cause any issues.=0A= >=0A= > Sure, and I gave a rule of thumb for that earlier: "default" makes sense= =0A= > when the setting *doesn't actually matter*, and you want to delegate the= =0A= > decision. That doesn't seem to apply to this case.=0A= =0A= The use cases are similar to the reasons why I'd want to use strict_types= =3D0.=0A= strict_types=3D0 is rare in practice.=0A= =0A= 1. Explicitly writing in code that you have chosen on a setting for the fil= e=0A= and decided not to use 'global'.=0A= 2. Overriding the namespace default if https://wiki.php.net/rfc/namespace_s= coped_declares=0A= gets accepted.=0A= =0A= That rule of thumb isn't the possible reason for why someone would use the = name "default".=0A= =0A= - Tyson=0A=