Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111145 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69228 invoked from network); 23 Jul 2020 08:42:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jul 2020 08:42:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4568E180508 for ; Thu, 23 Jul 2020 00:37:27 -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=0.3 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DOS_RCVD_IP_TWICE_B, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from box.beccati.com (box.beccati.com [176.9.123.236]) (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, 23 Jul 2020 00:37:26 -0700 (PDT) Received: from authenticated-user (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.beccati.com (Postfix) with ESMTPSA id 32BB120031A; Thu, 23 Jul 2020 09:37:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=beccati.com; s=mail; t=1595489842; bh=QpWIl2KBqKhYr/Qh7a8f0H/FwN0G8Uowy28zgjtvmps=; h=Subject:To:References:From:Date:In-Reply-To:From; b=h2/3Oar5t856IyqRB/PR7xl5L3G6Z1it2+V8vufiqmnuM1PvllFiDsCWJzOfYoto0 I+xqhXQ63c0/vb2o8RtCu4pxRaDjhApC7IO3lUP9OaBPWAbKM2JubIgqc4cx9YRjjJ iiCvG/+2RV4k/Nf5vGvwBeSGAQDfZhBHxkZHCTPxKtqOZYXwhljSuyC8QMwMwC8xay ynowgp818DSHgeXIgNR4goKu9WYcYyksB+KsDUJxMv3TiU/EDnWp6Qlf9vMXwONHDy 8aXscI6R/HHaronl08CZTrlUW+EmVZpT2zM/HxzUBiwUrttd4z1K1NSnJbJQDQb7ri 3maZ5qmuXx9gg== To: tyson andre , Derick Rethans , PHP Developers Mailing List References: Message-ID: Date: Thu, 23 Jul 2020 09:37:18 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] The @@ is terrible, are we sure we're OK with it? From: php@beccati.com (Matteo Beccati) Hi, On 22/07/2020 19:09, tyson andre wrote: > I think that `#[` has its own issues, but am open to re-voting on it. > For example, the following snippet would get parsed differently in PHP 7.4 and PHP 8.0, given a hypothetical JIT annotation for Opcache. > With <>, it would give people a clear indication that the file required PHP 8.0, > but a one-line annotation might be silently treated differently in many subtle ways in 7.4. > It's probably possible to amend the parser make it an error to put the function declaration on the same line or to have other `#` comments > within a multi-line #[ annotation, > but I really dislike the special casing it would add. This is pretty much the reason why I didn't go for '#[' as my first choice: the false sense of backwards compatibility that can be easily (and inadvertently) defeated with multiline attributes or inline function definition. Since '@@' is causing such unrest, I'd be happy to revisit my choice and embrace '#[', which was the second option in my vote. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/