Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111267 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 34649 invoked from network); 30 Jul 2020 15:37:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Jul 2020 15:37:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4C0B718053C for ; Thu, 30 Jul 2020 07:33:52 -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,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 ; Thu, 30 Jul 2020 07:33:51 -0700 (PDT) Received: by mail-ot1-f45.google.com with SMTP id a65so11049606otc.8 for ; Thu, 30 Jul 2020 07:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FzBuRnawqkjdyWzNb/pPP3hBltxsxjhYmYRismmDLJ4=; b=sda6fwJbRdJ8XMrlpRFas/PhwWYsVG6waS8NnV+fu1QKzSwrALuUWGZJnhP0NjAQnY xuzsXF4P7uKbznKc3BaaZlayXeJ4U82X00Gqkn9f9Z1+TFtaqd6MmJYDep7oH5ZFxRgm Qq9MTVsGufBN4UOTDdtRrkXRXxLHtUHsrvsJ28wxJZo+6yYa+1sNEx54I3v7ZCWHwwpG muKdVH608h6SEW+DonHC+sSgNGaLb+hXTzZRBLdmzt2RSKEgtkR3q62pYkTTVy3HoS1Z 6A7138K4x03LLIyki7fq/qdkY/u1Kjf14emV6mATIHsr8bnvGCAquN2GjlgxqiMMmbVU j9BQ== 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=FzBuRnawqkjdyWzNb/pPP3hBltxsxjhYmYRismmDLJ4=; b=g1ifdB1j1ypSnGywEG99Tlu9nksjeI5YCz1rKRQiP6EQdXtvju/yBmO4v+4F6Kx6mm vaaWzz2zCOx18aJBHNMEm5HQqlyae/LVs2GcJnDz22kSxkHpCeOp2j/CnjHvEKm8qZ7l URjy5JLozDQTAwwHTgLPIuJXsjDr4gql6Q+WkljzU7u4evfraQJpiifwbU1h0xixuivb piomuwI/dOlbYw5mVvRmDfLUnwHbh7I7nkLi9/KXhNVxuELXo/w3WH8kgSw3S9dCmpY8 SnlcEx7OFnwO1Ufe+4+Pfaa5IgnB/EOceY+Eyk00ujaw8jIlFSDReHNufPDc7ChXs9wQ dT6g== X-Gm-Message-State: AOAM531TGDkrmte3RYYbi3oJA3R+cLAOMx65GTmND+vAhKc+gsA0aAwN guwgYZc52/YusIguXXBn6LvBHKPGfmLEtde7FQ8= X-Google-Smtp-Source: ABdhPJxTZTh0XfpbNIqslVflY7PAgf3Ev9jnANHIAZw0m4Y8G6nF8TWRwPYirpo3zzuXwT+JMi25UlN05/fnv7vkqjw= X-Received: by 2002:a05:6830:2081:: with SMTP id y1mr2504239otq.114.1596119629289; Thu, 30 Jul 2020 07:33:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 30 Jul 2020 11:33:34 -0300 Message-ID: To: tyson andre Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary="00000000000085de9805aba98f7a" Subject: Re: [PHP-DEV] [RFC] [Discussion] Shorter Attribute Syntax Change From: david.proweb@gmail.com (David Rodrigues) --00000000000085de9805aba98f7a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think that verbosity is not a problem if compared to "strange mixed symbols", mainly to new users. Google it is a bit hard "what means double at". And "using attribute" is very clear. Anyway, I think that is valid we use it for now until we have a good symbol arrangement, and on future we could have the "verbose syntax" ("using attribute()") and shortened syntax (to be decided, but like "#[...]"). Atenciosamente, David Rodrigues Em qui., 30 de jul. de 2020 =C3=A0s 11:09, tyson andre escreveu: > Hi David, > > > I would like to suggests the syntax "using attribute(Attribute, ...)". = It > > is more clear and should not create BC. > > I'd agree that it's implementable and works with the tokenizer. > > My main objection is the verbosity, which is the reason I assume many > other languages have fairly short/distinct attribute syntax. > > ``` > // Assume Unused tells IDEs/analyzers/linters not to warn about unused > parameters, > // and Override warns about a method not being an override > > using attribute(Override) > public function apiMethod( > using attribute(Unused) > array $params, > using attribute(Unused) > bool $featureEnabled, > using attribute(Unused) > array $options, > ) {...} > ``` > > - Tyson --00000000000085de9805aba98f7a--