Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111676 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21997 invoked from network); 21 Aug 2020 22:10:29 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Aug 2020 22:10:29 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 65670180532 for ; Fri, 21 Aug 2020 14:12:29 -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=-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,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 NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10olkn2094.outbound.protection.outlook.com [40.92.40.94]) (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 ; Fri, 21 Aug 2020 14:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V+GJmndY3MBli93ksg5AfMh+x/Q1hXFjUb1CHBS6e7UWmW/65e8VERAgKk+LLwx35JiAebGam72IFgVd+KYJ9Zo7e+T4Oez5AL0C7KFuz4nGJqDBC7v8I2C3UOmU0IMKVyS1bxQd/dgxr7TdYgdb6d5/Hc5Bp8xpS7fksUUdWOYcDDojULq388tUruHP9TbgvdTkGFF9Hg55bDxdpbhXy8nZY6pS8s4NCqYqU1VDlb3EtprM817ND4ymj1BMEhzog1dLkRt4+0ymBHa2siosqTKfyG5vnlZwSBjWg8ng4Lvo8vSJ3IY/b3uJ1D/rN/qTg/FVNjCUtz911YIY8yqOsw== 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=zRpTefAC130reoygZzxshJLuwKfQWCJYTP9iC8wLNVI=; b=G47/PA4pnGqweX+Nvzfe0LoL9RRBZTCHWIckwicOYqQlRYpSBHrB1uCTLbB0YzeKA3oKqCvIf5QR8sIgn3OhfL4GZB6ZXyJB4tiPJ5bdZj9G+KjCKMSXdkBK1urbhY43bOl6cuSyX+YXPRG/T2AQeYVcjar50XZj0EpVc1es4rVzG6peM0wsii1wSTpEDiSoTpD/vOz32vHLk+ey12+d6dOSnWDxZLlj9xNKINDzirykDs5JsNwjFeU8za+z7Zn6cvLt+iaIuMeVFgdeoOxme0LrU/lclcfr+Vl2vfRctQinpBhXENfmobCOn+NxxKoRv0nHQFGjP/EUpPmTCXUdTg== 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=zRpTefAC130reoygZzxshJLuwKfQWCJYTP9iC8wLNVI=; b=hCX+SihcpNH1NzrhqjXlsnktmfJYAtYdLlCuId/aYr7h454q9d112Zcjievb1TM6BsXWeZLWyU8/IHDYYER/aiUFUh5Jxm//5bPOMAldgwAmRDz/MIkAr9k4GLMGpBJUn+B6rtHjUUNX3iS9CxNb6nsFZCwp/gCvrhKYCDNKE6ZW3srhXLr437abdsfOCKWB9wDo/biFRcKbnnIOZ6cb0r9kjKe8lZSuka86yJG9ExPf2LSJX0yfRih38FIabdMkJBOZ1SNppljGL9foZPDp5YnmmFN2BEJV0OfbLRzPs3wpdEWIjL+d8iafYa7zvsEZllHbqVDsUUHKOZdO1zeADQ== Received: from BN7NAM10FT038.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::46) by BN7NAM10HT249.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24; Fri, 21 Aug 2020 21:12:27 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:7e8f::46) by BN7NAM10FT038.mail.protection.outlook.com (2a01:111:e400:7e8f::287) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24 via Frontend Transport; Fri, 21 Aug 2020 21:12:27 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::f9d1:ed5b:8625:bfb4]) by DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::f9d1:ed5b:8625:bfb4%7]) with mapi id 15.20.3305.026; Fri, 21 Aug 2020 21:12:27 +0000 To: Theodore Brown , internals Thread-Topic: Should hash comments be deprecated? Thread-Index: AQHWd9/i7uMAZC0X8UefGA07rPcslqlDCT/B Date: Fri, 21 Aug 2020 21:12:27 +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:6545A6EB0A28F3917DE59668C267D6240A73214473CB2B959B5995D4DDF29429;UpperCasedChecksum:C8F4C8823C06B87F9B9178781FD1E53FDBB4DCBB2194D5AF27295917617683D5;SizeAsReceived:7075;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [UdPkE5kCGWQSfnTzP6esWsg2QqJKGe3JYDy7kRadntdPIgGGnYDvFWcseZH0rWmR] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: d2e3ba87-656d-4e10-7cfb-08d84616e836 x-ms-exchange-slblob-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wi6aX1zBwde4npwvgmOplyxKBXsHt?= =?iso-8859-1?Q?OTFoQ1H0b271StswJiC6LIb0XrOLfFpFy4uB05VdTzdPwVGuesuP0baO0K?= =?iso-8859-1?Q?d90w6R9b+QmEdXWzhGPWot0s0yV5Iy89i0SymJvRdt4=3D?= x-ms-traffictypediagnostic: BN7NAM10HT249: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DzYry8gjRGecmfSNIpB7vHjj7ZSsfleYiIqPra4AJtQR2JC17Q2FoRqfjLIDVIueFnhsSQ7P9bPW3FqP/9knLP+Hk7YWkQz1j8c3fXs7sDTn3h5k3YpxByReywUX1vyuPlF+AjvWvnjR1XVJ8TeUCEybYPJ+WAAxIA9m+Zo0UTuSNivNT6PY6jbu311z+7ouRfxnYzrByusPjWYPssEBsYqlsd11AH+EZ1su2hU685nwtYDHDnijIYbQSjGVAbg1 x-ms-exchange-antispam-messagedata: 2jmH0WWY43x01ZrymxSNsGxd2g6UyU1isOJeIuCd4nrUn+3daH8SlQjbIeDbZeiXg4AA8VOqZZ/jcTPM3JzbHn8GPj5r4W3kKg8kH3Vuk7kxyGRTcRCJCBcXlReWfqnLs6bQP7rMx4OWcS3UIoBLfhDQkIqAl/pn29pU7KAa8y1epe/Brm0+nKBGtrE8skYEZjySO8y5RQmu9lV7tLreYA== 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-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: BN7NAM10FT038.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: d2e3ba87-656d-4e10-7cfb-08d84616e836 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Aug 2020 21:12:27.1405 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT249 Subject: Re: Should hash comments be deprecated? From: tysonandre775@hotmail.com (tyson andre) Hi Theodore,=0A= =0A= > Since the #[] attribute syntax is currently winning the vote, [1]=0A= > it makes me wonder if the use of comments starting with # should be=0A= > deprecated.=0A= >=0A= > Otherwise it seems like we could be setting ourselves up for long-term=0A= > confusion between attributes and comments, and also inconsistency with=0A= > other comments (it will no longer be safe to assume that a line can be=0A= > commented out by simply adding # at the beginning).=0A= >=0A= > What do others think?=0A= =0A= I don't use # comments in practice that much, and objected to `#[`,=0A= but I'd imagine there'd be two main objections.=0A= =0A= 1. Most significantly, existing code would break in the major version where= the deprecation became an error.=0A= So libraries that stopped being maintained in 2020 or earlier would all = either need to be forked (and forks would have to be published to composer)= , locally checked in,=0A= be affected by a post-install script, etc - non-technical users of PHP a= pplications may not do that and delay upgrade to php 9.0 or 10.0.=0A= =0A= I imagine there may be very strong objections to that from others, but m= ay be wrong, since the invalid # comments would be easy to check for and au= tomatically fix.=0A= 2. Now that we're probably going to reuse `#` for one thing, we may e= nd up using it for other things that would benefit from forwards compatibil= ity=0A= now that applications are already forced to deal with this lexing change= .=0A= =0A= ------=0A= =0A= Some examples of what php developers hypothetically could do by continuing = to repurpose #.=0A= (I have no plans to put any of these forward as RFC)=0A= =0A= ```=0A= declare(=0A= strict_types =3D 1,=0A= #php8.1 very_strict_something =3D 1 // #php8.1 could be a token that's = treated like the end of a comment in php 8.1+=0A= )=0A= =0A= #[attribute] function() {/*unused closure*/}; some new php81_syntax();=0A= // a more concise, self-explanatory version of the above that could be used= in more places.=0A= #php8.1 some new php81_syntax();=0A= =0A= // A version of assert that is guaranteed not to throw with any ini setting= s=0A= // and that can be optimized out in php.ini-production=0A= #expect($condition);=0A= =0A= // Adding a forward compatible syntax to declare that an argument is passed= by reference=0A= // i.e. https://wiki.php.net/rfc/explicit_send_by_ref=0A= function inc(&$i) { $i++; }=0A= =0A= // instead of =0A= inc(&$i);=0A= =0A= // one of these could also be done=0A= inc(/* & */$i);=0A= inc(=0A= // or #byref=0A= #& =0A= $i=0A= );=0A= ```=0A= =0A= Regards,=0A= - Tyson=