Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111476 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 89022 invoked from network); 11 Aug 2020 17:08:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Aug 2020 17:08:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 11C10180531 for ; Tue, 11 Aug 2020 09:07:55 -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-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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, 11 Aug 2020 09:07:54 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id f26so12724684ljc.8 for ; Tue, 11 Aug 2020 09:07: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=tbeY15TW4rE9DSx2MX71D0XU8QkButJi6UTOGxIaXyo=; b=R/iBEe/0hfsC3fRUeilxERuff0g2jB29pAie7jrJmbT0msv8F6aOh27AzeGD58u9b1 nA/XTd1WMDO5s2j5S/xw926E8vaAabHI49F6HZsNHe+3Ks6KSOGCZqW1rlvN1I1TpDSY YofOEuK9Uoy6GmWDHg5nom6DpoPU4IVeXLCdDUyA4PWN7/QLe7OvBqo+grt2YU4f8JfS /qxUL1VfWBixrgEv0R2qS5n2/XSgaS+12oQxQfgxuY4lfyq2ipCt2lcjgTR5kAnn7VJd wAWqWSYsKyAMiuo0wdLoWrqk5qqXUHy7DyCId+0EdGkXwsqsSB7/aS75jVOwDunxZjhi npKg== X-Gm-Message-State: AOAM532pwjzkVlcXF5JagwhJSrvHpQV4aycjsAlUJsB67NlfIHZ8m8ae THwe6mjOys9QtC4qC3GPqdaeE6WjKwGYSxawFbFq3g== X-Google-Smtp-Source: ABdhPJxawD3NwReaRRwTv5u9wtIi77ckcH/Ev8f1x/Klzi5mg72x2x48PsI7nzzSjzg16e94yDs42G+Nrkb+o8olpL4= X-Received: by 2002:a2e:8150:: with SMTP id t16mr3314441ljg.160.1597162073069; Tue, 11 Aug 2020 09:07:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 11 Aug 2020 11:07:41 -0500 Message-ID: To: "guilhermeblanco@gmail.com" Cc: Derick Rethans , PHP Developers Mailing List Content-Type: multipart/alternative; boundary="00000000000003b58205ac9c4631" Subject: Re: [PHP-DEV] [VOTE] Shorter Attribute Syntax Change From: pollita@php.net (Sara Golemon) --00000000000003b58205ac9c4631 Content-Type: text/plain; charset="UTF-8" On Tue, Aug 11, 2020 at 10:07 AM guilhermeblanco@gmail.com < guilhermeblanco@gmail.com> wrote: > I'd like to explain my rationale. Most of the time I end up using > "#[todo] Whatever" while documenting my code... my intentions are "# > [todo] ...", but you know... missing that space char doesn't break > anything today... > We could disagree on which is more common today @[] or #[], but I don't have the numbers, so it's useless to argue that point (though I will say that @[$foo, $bar] = explode(...); is valid syntax that does something while #[todo] whatever is just a comment and therefore a bit arbitrary. But again, I'll agree to disagree on which of those two comes out less problematic. Certainly in terms of YOUR vote, you can absolutely choose to vote for something which doesn't break your workflow and that's 100% valid. Certainly we can agree they have the same fundamental BC break chance. And have the same work-around for fixing (add a space). > In any case, BC is broken and FC would also not work. > > This is the part I replied to call out. You seem to be stating that "FC would also not work" on the #[...] syntac which is demonstrably false. Writing this on PHP 7 (or any earlier version for that matter) would be valid syntax (ignored as a comment): #[SomeAttr(123)] function someFunc() {} That's what's meant by Forward Compatibility. Library/Framework authors could aggressively adopt attributes with the #[...] syntax, they can NOT do so with any other syntax. -Sara --00000000000003b58205ac9c4631--