Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111321 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 85102 invoked from network); 4 Aug 2020 16:04:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Aug 2020 16:04:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8E23D180539 for ; Tue, 4 Aug 2020 08:01:54 -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.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 4 Aug 2020 08:01:54 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id h19so43948111ljg.13 for ; Tue, 04 Aug 2020 08:01:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VvfbPksjX64MzJayYz9YKBREikd0husZXLefxsktar8=; b=ngp8UmVwc8d9kEIFnkimvuC8gIWPLLRQJzyN0PTKzTZPY/hYTPCLIs5L+Wr41OaQIF tOSI2CdAtCjfyAzoz9Jto5+w0RDi0Ht8oMKKY9dcbfOvyGwduvGCahi2FYra7oGJEXwD wzJbli8AXiTWSJ843bZLhHV5HbmfNup5g1/MkopTI//2eSXVmdfOXUo9V/W7RbTqwbxM fyFCSz2A3SI/OUzJRz7tNKE0Rm6r+GvvD9mJ2FZotBOCJ5Z43FjuRQoQ482WuGEtBYLO q4spvlw0UC9cTUTNbbSA3Bo2pscOV+kb2NA87CgjBPk2euGRcD9VvB19Pho955c47HNY iOSw== X-Gm-Message-State: AOAM5302Lnk0uwAax43os8AQAX/ip5LoFFR0ky9mGn3QCvSKtcPznwud a832+2fI0j94OqoxY1RNcqsW0x/nKfK7mphlA416yQ== X-Google-Smtp-Source: ABdhPJzz0qmjT7AFF8OgmTiMGa6VLrKenFNOBIHLEtVzGYyIeXvjuVNI5qhuOfxLzaO6/+vbZAdMZxA3EMLMDMaJE4Q= X-Received: by 2002:a2e:9792:: with SMTP id y18mr10977876lji.172.1596553312573; Tue, 04 Aug 2020 08:01:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 4 Aug 2020 10:01:40 -0500 Message-ID: To: Benjamin Eberlei Cc: Derick Rethans , PHP Developers Mailing List Content-Type: multipart/alternative; boundary="0000000000000fe5d405ac0e8945" Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: pollita@php.net (Sara Golemon) --0000000000000fe5d405ac0e8945 Content-Type: text/plain; charset="UTF-8" On Tue, Aug 4, 2020 at 9:03 AM Benjamin Eberlei wrote: > It provides a small BC break where code written as @[$foo, $bar] = baz(); > or $foo = @["bar" => $baz]; will not compile on PHP 8 anymore, but that can > be easily > fixed by writing it with a space between @ and [. > > If those are the potential breaks we're choosing between, I would favor #[...] as it provides strong forward-compatibility to drive adoption and use at the cost of a parse error that's easily fixed (even programmatically with a very simple script). @[...] provides no forward compat with a roughly equal chance of easily fixed syntax break. Given that, the choice seems obvious to me. Change my mind? -Sara --0000000000000fe5d405ac0e8945--