Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109702 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97445 invoked from network); 18 Apr 2020 18:13:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Apr 2020 18:13:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E3C281804C2 for ; Sat, 18 Apr 2020 09:43:53 -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, 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-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 ; Sat, 18 Apr 2020 09:43:53 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id t11so4363671lfe.4 for ; Sat, 18 Apr 2020 09:43:53 -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=RoNY8Fa2t8YmpwdYXwvvvMqELBLcSz1rTsCR/A1vl5g=; b=U/F4CyS/a3Mt4SIFTAFy1ajNXcLXjnalG9x5VzBxty7B1SLktaZvOaCHPxPnx7KAvh Wqcid9NWGHZMLEj275dAZPPRbsUSpKJMBVaMCdVOeP+in3ceei42dmLBxmQPIavoiq5m XHqMmvwXFxQdP5n8FMq9+hGaIyLjntkZ+CpL9qeSUl13o32K64O/T3p6Kou7k4EVcCUA jSzPAfCOMN+Q23yA3BFb0Bku4RCyJR6WFMyYhf+xGpIWm2MyjPzKPs2cu5+wVCo1xTyR cCCyn7uqVUJwPtbP/BDgoqmLjPOnd1lTRiH8GKQp+ZK9av6adtKvwYLbByDV31rjY/FS GjDQ== 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=RoNY8Fa2t8YmpwdYXwvvvMqELBLcSz1rTsCR/A1vl5g=; b=AH/wo+eI/uZbBIlLR3QZKLdW3d6eL55s9nTtwU/f1EA9DDWEHxtIIpvrIRe5qmig6J Y+gRbPX9p1hI8hoqFonXOdLOt8Ecw70S7hebShgnFsdQUKbfcOy6OYFLFVaEFzoArbaK nlC0YDQV3Z+oxRi0P9/N7JYr4+WgBKRkDj0tcx/HxK5hSlUk44Bnz+dAsRPXNT66dKY8 qJ2U+aLU13AGXwXrXxPs0jOSk5Acj50ymlAhBgFFoSHM1I/JKkr8lKZIcD/0rvdtefFo Jv9XP6SD7B7QCg8ZkCfCR5KPuXqYo92UOwyOaaK9AwMNGih5Sv0ABc3ZtgAgQY4cGsrG Zbvg== X-Gm-Message-State: AGi0Pub+5jelF0SJ0XtzTqa+dXbH+nivicT2ETSxUSj2KGXTEzkiZBcF 3AIV1HvMUcVzDS2ydTU3ylE+Xp1TTaze1JhQow== X-Google-Smtp-Source: APiQypLLNJT/gRES7p01X1zgo02sdBM/NQhwcY/s90ZPG6RASmFxVkXrpbr4wJJC5y7byBMc0LrHJQahlz+HGQ6omwo= X-Received: by 2002:a05:6512:3049:: with SMTP id b9mr5555796lfb.176.1587228230244; Sat, 18 Apr 2020 09:43:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 18 Apr 2020 18:43:38 +0200 Message-ID: To: Theodore Brown Cc: Benjamin Eberlei , PHP Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Re: [RFC] Attributes v2 From: guilliam.xavier@gmail.com (Guilliam Xavier) On Fri, Apr 17, 2020 at 6:11 PM Theodore Brown wrote: > > the RFC says that the alternate T_ATTRIBUTE `@:` token has the > downside "that it does not permit whitespace in attribute names to > allow detecting the ending of the declaration." Can you provide an > example of an attribute name containing whitespace that would be allowed > with the shift left/right tokens but not with the attribute token? From what I saw in the related PRs (esp. https://github.com/beberlei/php-src/pull/2#issuecomment-609466083), the main reason is that if `@:` were defined as a standalone token, then the following sequence (with whitespace everywhere possible, like in https://3v4l.org/NRYbp): function ( @: A \ B $x ) would be ambiguous between two possible interpretations: function ( @:A \B $x ) // A attribute, \B type declaration function ( @:A\B $x ) // A\B attribute, untyped equivalent to respectively: function ( <> \B $x ) function ( <> $x ) which permit whitespace (unambiguous because delimited): function ( << A >> \ B $x ) function ( << A \ B >> $x ) (although I've never seen code with spaces around namespace separators). -- Guilliam Xavier