Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110660 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50173 invoked from network); 18 Jun 2020 16:07:29 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Jun 2020 16:07:29 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E23B518056E for ; Thu, 18 Jun 2020 07:53:25 -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_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 NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12olkn2061.outbound.protection.outlook.com [40.92.21.61]) (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 ; Thu, 18 Jun 2020 07:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xn86WOrniKk7+K4BZFZjRo/X4WltbiUvEwASir9mlq/rqKg/NppjImGxLGIEm4Cmp38e60y3/aeK3eURuzF6qDRR6wlSj+i1hk+JjBysUpWV4UIiqM6nTZQnilZuDQ49tSPX3cE1DPGFDeSRnrMuxLH7jEgJn7Uzn5WBkhw6p99ZP3lx3inapekvBJGjLryLIOCscVXSIYSV19RbxJFSi8/COrclDcKzIYFIAEEDl1f8oh3xdk1WaZ8dds1ishKuERKMsH1CRICpGJBzb8iUuEbz/RzqTU9aRI2Q7M5PJ3aBxKfMs41l7kt0ifbzJU6G5ddN2YaJH0YkHhUHDCYsPw== 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=zGL9be/QdiYF2SDTgwMlot8QoGEy8f/2CPIgzJmhXKE=; b=AuvKPBqQKw6fjGq4mZbPu64jexB6FKy9J+XbSd7xgy4Yfr5YCoT4EL6yu/RO8RKKdquS9p8tObLwBUzBpNAc5hNcWKpq15dQyMjJAeTtKb9GVZpSbSXRpC+x1hA9qx+ncdYBYOkZ5/4oIlUKuXSGgrR/v768LUIlJjAehE8RqySxm36EhnRMHyGqhSdnI7/5B3gSzf+c4mGxXF+MUnVQr/Cge1Gy2OcsxbtSddCAiCI2uG3qxvfGj4YNEuJLvza1gbchJGOALg8YyE/g9tGPIIxIh49PYZ7C7Mewv/510ZYhryAh5SyGM5/wbksWzBmsBubfYhkXyc4JjCMzQp5vZw== 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=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zGL9be/QdiYF2SDTgwMlot8QoGEy8f/2CPIgzJmhXKE=; b=is+zvItt6AFZTnV7gaBJO61UtuAgD7b/d8R+RLRCOlU3dgCc6akCPyVBVJhqXgYXDWvMug88dcQsowE6/h1ATDNrSgBRb4eJxri0ob/8fAhbJ0+lvWvAqQrH4zQhLHs0zvcC6vPctjRCCdTnbpIRS6c5OVFkRVFoSvynaU0WkWSgEOvoux+Pn95qAiuiS9j3Xz1Maiwkqa33M3Ap0ZuwosjRxNJo+9ABYSQ3WshYSeWasOA/upyzjnU/loSLfYa+OmkgvHBT+eDf0rG4W5z9BzkB8IOV/lwkA4mHfs5gHPtTgUvMU6RetGhGEHHKwOPtroghCDL+ZZUVKvNDGSDhNw== Received: from MW2NAM12FT024.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::45) by MW2NAM12HT074.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::438) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.10; Thu, 18 Jun 2020 14:53:23 +0000 Received: from BYAPR05MB6535.namprd05.prod.outlook.com (2a01:111:e400:fc65::40) by MW2NAM12FT024.mail.protection.outlook.com (2a01:111:e400:fc65::91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.10 via Frontend Transport; Thu, 18 Jun 2020 14:53:23 +0000 Received: from BYAPR05MB6535.namprd05.prod.outlook.com ([fe80::54e2:1eeb:fc5d:8c21]) by BYAPR05MB6535.namprd05.prod.outlook.com ([fe80::54e2:1eeb:fc5d:8c21%3]) with mapi id 15.20.3131.009; Thu, 18 Jun 2020 14:53:23 +0000 To: Mark Randall , "internals@lists.php.net" Thread-Topic: [PHP-DEV] Re: [RFC] [VOTE] Shorter Attribute Syntax Thread-Index: AQHWRQKQbvf9bxvtNUSOWe9X3tRkaKjeYgYAgAAUHXA= Date: Thu, 18 Jun 2020 14:53:23 +0000 Message-ID: References: ,<506d9d2a-1c24-4de1-b485-1a7bfd6bb4e3@VI1EUR04FT006.eop-eur04.prod.protection.outlook.com> In-Reply-To: <506d9d2a-1c24-4de1-b485-1a7bfd6bb4e3@VI1EUR04FT006.eop-eur04.prod.protection.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:0A9689A8D31852C627A59E8DF3D7C9CF3BEB3BC782FA99E9E3D39333BE2D484F;UpperCasedChecksum:C15486CB5EBD7CBEA3864647E52CA9BC4A945225B912460527D68A9D6D33CBD5;SizeAsReceived:7052;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [eSoNpmqwxsdQAWS0MFS+UiH3duf5uWba] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: a638da05-f2e5-4e7a-6696-08d8139759b2 x-ms-traffictypediagnostic: MW2NAM12HT074: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: c/UAF+hQh4Vp4Um27VIkalhkUl04ADK08uV0FQZ44MWFdp5LMXpOnkYtD/k4tdR3HG05Hy0G8g1fyNBn9mhr5RY89VCfP6LK1/oEEGqlHfNuygh+LNWnSvFUgWTeqU/MLga/atCcpq1sSwuKnlQ7JRKEonqGg2q20MUHX3A0/DIW1kO80ZeJQJjpTT3MhtKYRyg80382L7Ga5nvB9X1ccD4oo79qF4mIGozkLF+7NFStBUdN3tZ6I3kojj0XaMqA x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR05MB6535.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; x-ms-exchange-antispam-messagedata: eFsg065hHNSUQeAIpeKIeTxXfDK+bsYOzXWSdZkULtcFf9pXXS5O/i0KbMnfjZ9B+Zbcs7rTT4Po+m9yC7SODjUOSOeUi80oCl7LX7ur4Z7LnxkaIXIthVJ2h1ADquq3bP3ZDuaUqi/JdcuzHfUmog== 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: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: a638da05-f2e5-4e7a-6696-08d8139759b2 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2020 14:53:23.8368 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM12HT074 Subject: Re: [PHP-DEV] Re: [RFC] [VOTE] Shorter Attribute Syntax From: theodorejb@outlook.com (Theodore Brown) On Thu, June 18, 2020 at 8:40 AM Mark Randall wrote:=0A= =0A= > On 18/06/2020 00:59, Theodore Brown wrote:=0A= > > I've opened voting on the Shorter Attribute Syntax RFC:=0A= > > https://wiki.php.net/rfc/shorter_attribute_syntax=0A= > =0A= > I'd be wary of @@ simply because if we do add validation to them,=0A= > we would likely want to use the suppression operator to indicate=0A= > that a class might be omitted (such as if an optional package is=0A= > not installed).=0A= > =0A= > At which point we're left with @@@ and that's getting into silly-land.=0A= =0A= Hi Mark,=0A= =0A= Attributes were already designed to be optional, though, so there's=0A= no need to suppress anything. Attribute validation occurs when you=0A= call `ReflectionAttribute::newInstance()`.=0A= =0A= Or are you suggesting that we reverse the way this works, and always=0A= validate attributes unless a suppression operator is used? I'm not=0A= convinced this is a good idea - it would require adding a suppression=0A= operator for all the use cases where attribute information is=0A= collected without an attribute class, which changes something that=0A= should be an internal implementation detail to require different=0A= syntax for end-users of a library. Also, it could be confusing if the=0A= suppression operator only prevents autoloading, but doesn't suppress=0A= other warnings. And if it does suppress other warnings, that would=0A= probably not be what developers want in most cases.=0A= =0A= Lastly, in my personal opinion combining the suppression operator=0A= with attribute declarations looks like even worse symbol soup with=0A= with the other syntax options. :)=0A= =0A= Best regards,=0A= Theodore=0A=