Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111481 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 98082 invoked from network); 11 Aug 2020 17:55:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Aug 2020 17:55:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 605031804D2 for ; Tue, 11 Aug 2020 09:54:31 -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-Virus: No X-Envelope-From: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-oln040092010080.outbound.protection.outlook.com [40.92.10.80]) (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, 11 Aug 2020 09:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WlR/VFV9gDtXLHu8wqqZY4gNlU/tr0b8AWKdgRY4eSDt0sLOOtPSd8L3dLnj3tWzYBDQm1ALgWHR0M9tAyjdDkxN4Fu2bShNLCJi8WzccxM9yNlvbtlxx5Rf4WCvai8qKjAfbSaac0dqkznNebdfrJQYuvXnuVI12NyzKHjk+ByPfzU+Im6f31hbEFH9J1q10JR7UblNV2PAgcp/+0bH5OMaDgPnCnhUZQT2Jd6r0uimqthYph1TORwUFYd9ljwDtbPsraLdCr6LLLPOm4S1XG9gxDh5t+hIqkj+IvQLRSJmGotmnrK6BDIjUZN+/fnC2nt/yYPmBhogKDfr8UPmoA== 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=k+5AxJj3+mjkuBT4j1q8SkZnhv0dWclKkZawE4mOA3E=; b=MShkY3pcemiZLhH3Y0sfZG0aK/G33xK8OmEU/20iRpNQSZpPSF5dBd1JhKngBEW2/qVYoVvG+ErFD02ANpo4yxTA55v4b439H2Q+zrLKSHS6DFyRxeWUCXHdSEeIQz1gsGnTBSJqVkr5wUd8vnyeIKFsPB4tXv9MaVNfRnD6WBP3YgcgB6GbeZvzOTJBtzJ2GtHDnTpTSspjAG36T9I+VhkzSMZyqyORJgZ/AjQBgD5N/JOH86JwnzQeaeehn/JmmqImPTgG5J32/OMFk7LtfWpCbrDaU1I22LvWhQ74qtLTzIkBQhPXuI6TOkqhSKU8UHKRd4gjQ4RUJitlI5NAvA== 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=k+5AxJj3+mjkuBT4j1q8SkZnhv0dWclKkZawE4mOA3E=; b=PuSXw57HmYgB/v3EXAdMjgfkEl2NiGKK4R08UbPZaep30XwVD4vPyAxoxqyEpdqXFWjR3De13UFvrGNIqwG/u/9094RUyKnuktGxz4rqCPFXU5MmNHRqUOJgodsZMDCKtHGou6iIyAYTZ0Ik4FgSt+l/aRvULZWtE+Pk1q9iqWI9hbRbfmYjUpDPaygzVylP5WAT96Ry3M9NPrUlIazgfY3CUahwttLpA04CoSM2WE+xHCeM32/cw6doWvSyk5b++g8EjI0wmFlP2smFmSkADfS/QT7RjLnOJEXo2QAcf0eJRmL4giTDu4PX7q1bwMPgjn84OdmXXfk8DBFBYq0n7w== Received: from DM6NAM04FT041.eop-NAM04.prod.protection.outlook.com (2a01:111:e400:7ea3::4b) by DM6NAM04HT185.eop-NAM04.prod.protection.outlook.com (2a01:111:e400:7ea3::257) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 16:54:28 +0000 Received: from BYAPR05MB6535.namprd05.prod.outlook.com (2a01:111:e400:7ea3::51) by DM6NAM04FT041.mail.protection.outlook.com (2a01:111:e400:7ea3::308) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16 via Frontend Transport; Tue, 11 Aug 2020 16:54:28 +0000 Received: from BYAPR05MB6535.namprd05.prod.outlook.com ([fe80::fc6c:38b0:fa18:f355]) by BYAPR05MB6535.namprd05.prod.outlook.com ([fe80::fc6c:38b0:fa18:f355%7]) with mapi id 15.20.3283.014; Tue, 11 Aug 2020 16:54:28 +0000 To: Rowan Tommins , PHP Developers Mailing List Thread-Topic: [PHP-DEV] [VOTE] Shorter Attribute Syntax Change Thread-Index: AQHWbvIBydbCX+rhJUWK/r8c7hnlt6kysVCAgAAkzoCAAAFUAIAABrJtgAANHoCAAB8sZ4AAAuIAgAAHfnWAAAh6gIAAAcP4 Date: Tue, 11 Aug 2020 16:54:28 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:9A8CB7EE223ED596E60C89B94B32372355EFF113A531CCC86E77E80C3DCB5AEB;UpperCasedChecksum:B0307B51A64B03B938249AF65FABF5DE248552CC9221B7A14365D1D54124127F;SizeAsReceived:7673;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [e02Md5U50M+lisiyaSVGm3TDeZ4Ote8b] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 64df07f0-3d61-406b-0097-08d83e173645 x-ms-traffictypediagnostic: DM6NAM04HT185: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AvMVhSKYF8EPR/jQ/ofmZlFEkHTlRDqoDr238aXRML5lK/PU8FK1YQ68iH9VldkY3GL9l6TBfFP8i++Oi1ufIYS2JaUa+KTzkOpKG2uA0B/iThzZr5ORm9GE99H5phOVhV5jFFbeCIAUjZGL+WNlr3PLveX6AshATWZYZIw6mXoURA0MSWfPW7S7tmiqFJy110JAG+f3h7c6qECXbSxTHQ== 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: cyzaO3+BKN0Ox13tq0TXFnrGrdaijnYWdhRI6/GCZZkM1fwikn6FlyQ1018LgptHmatPgGgrrEO7nTaiwRy28mEgjofufP2U8qvaekhDaJP75l5yKKljjJgVknBt2r30ZST+XVXy7bCpsxsZqXM8Bw== 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-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DM6NAM04FT041.eop-NAM04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 64df07f0-3d61-406b-0097-08d83e173645 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2020 16:54:28.8367 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM04HT185 Subject: Re: [PHP-DEV] [VOTE] Shorter Attribute Syntax Change From: theodorejb@outlook.com (Theodore Brown) On Tue, Aug 11, 2020 at 11:36 AM Rowan Tommins wr= ote:=0A= =0A= > On Tue, 11 Aug 2020 at 17:07, Theodore Brown wro= te:=0A= > =0A= > > > > fact that the @@ syntax makes attributes easier to grep for.=0A= > >=0A= > > This can be a simple Yes or No. With @@ or @: you can type those=0A= > > symbols followed by the attribute name to grep for it. With the other= =0A= > > syntaxes and attribute grouping, if the name isn't unique it may be=0A= > > difficult to search for since you can't rely on a unique leading symbol= .=0A= > =0A= > Surely *all* of the syntaxes will be easily greppable once adopted, becau= se=0A= > any instances that aren't attributes will have to be fixed (other than=0A= > those in comments and strings, which can happen with any of them).=0A= =0A= I think you may have misunderstood my point - it's not so much about=0A= the leading symbols but about grouping. Consider the following example:=0A= =0A= @[=0A= Jit,=0A= Route("/api/posts/{id}", methods: ["GET", "HEAD"]),=0A= ]=0A= public function show(int $id) { ... }=0A= =0A= What will you grep for if you want to find all places where the Route attri= bute is used (but not some other class named Route)?=0A= =0A= With the @@ syntax you can easily grep for "@@Route" to find all the=0A= places where specifically the attribute is used:=0A= =0A= @@Jit=0A= @@Route("/api/posts/{id}", methods: ["GET", "HEAD"])=0A= public function show(int $id) { ... }=0A= =0A= Best regards, =0A= Theodore=