Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110324 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83307 invoked from network); 1 Jun 2020 11:22:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jun 2020 11:22:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5FED51804CB for ; Mon, 1 Jun 2020 03:03: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_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) (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 ; Mon, 1 Jun 2020 03:03:51 -0700 (PDT) Received: by mail-il1-f178.google.com with SMTP id g3so3154359ilq.10 for ; Mon, 01 Jun 2020 03:03: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; bh=cIgZRlG/wdSPS6fgdCavVlZJwLXSZY7AGWXLwdZcXIE=; b=IaYly3wCfpt9Srf0EzlZP8W9cz5TgRrWklDI7f7/ovyhKRNd0Z5F3sSKl26ZA5HNTs qgn6q1Rp+uRQ2gX29DHVrtwjwR9Rg4qC2SUJV/ub8YALuJdkVOGm68vjO7OjiVpw33TV xFlalr6NF+YayPcU7HV1QWbRof1deiWMjD5Tvn+WXUg5HUKH/vV5E3W6bkm/FxJkWmhh rEkmEmb7BQhG0bTqf8PqhUw0ihf/0rG7Jt7DxeWRt7D/q+qs0bc+hzIWF0JPwtv56+4J 8VWBrtYh4lvEHcG0J6Ee2HVGAninzB62KNTuKO7V2SScvrPjSLipX+Lazm1J4KiVt6Lu QKsA== 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; bh=cIgZRlG/wdSPS6fgdCavVlZJwLXSZY7AGWXLwdZcXIE=; b=lNlx4VvXGSbX2fKji9bAqCyaWNIh7sR++FJv/+ABZlvM8lnvnMC01GDmtjnNjvhHR1 8vkkbCE45t15Y6i6yKKQrH4jzLDvPDQnhsvErY0XrKPIlwDiKa16QJjuBKvTgB4dX99C 74Wx0MJcDtvaN7eJl+4bfV1CH+io68L4I6c4DeDFrzxW+Ghg0z1TTVmuDYPGx0f8u425 KUzgwGe3v+SCkYW85Ev6QXc19//nvnqdSqPaUgff8eTtnd4V9jeNX+Z2uUGDK9aYolsU WwqwvDCk3Fmrnw53ZN2Ir1EOOdclkjIcpT1dPjQQuS/KmuU1IEQszu/ZKBGHy91I94PO BleA== X-Gm-Message-State: AOAM530lBgadW68492Xk/a1atbwiu2wvdf2FJ8mepqg78oEttVYqQZgp tV2NzPbY21ct3FH0ABPDMs5KdvTZhDMKzWqlkdi7j5p4 X-Google-Smtp-Source: ABdhPJwIWTRTqi+DXcAchXGA/v01Cmn8LDy+dXxDMxh0/jcb8106Q0PLNwjMqB/hKybq4MdqqNOeP/JC91/SJXn7mCA= X-Received: by 2002:a92:9917:: with SMTP id p23mr9574435ili.172.1591005830893; Mon, 01 Jun 2020 03:03:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 1 Jun 2020 11:03:38 +0100 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="00000000000062d55705a702e917" Subject: Re: [PHP-DEV] [RFC] Amendments to Attributes From: rowan.collins@gmail.com (Rowan Tommins) --00000000000062d55705a702e917 Content-Type: text/plain; charset="UTF-8" On Mon, 1 Jun 2020 at 00:48, Theodore Brown wrote: > > Having a distinct token for attributes would entirely avoid the issues > of having to modify multiple lines when adding/removing attributes, as > well as confusion with shift operators and comma-separated attribute > arguments. E.g. the RFC example would look like this instead: > > ```php > @@Attr2("foo") > @@Attr2("bar") > public function test() > { > } > ``` > I'm not sure what you mean by "having a distinct token"; the cases where there is any chance of confusion with bit-shifts are going to be very rare, and aren't related to any of the other issues you're discussing. You make some good points about not having comma-separated attributes, but they don't require us to change the syntax, just not add that feature to it. On a personal note, I find @@ a lot uglier than << and think a bracket-link syntax looks clearer when writing multiple attributes on one line to avoid long thin columns of code: <> <> public function test() { } vs @@Attr2("foo") @@Attr2("bar") public function test() { } Regards, -- Rowan Tommins [IMSoP] --00000000000062d55705a702e917--