Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111373 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99951 invoked from network); 8 Aug 2020 09:36:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Aug 2020 09:36:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 42C901804C8 for ; Sat, 8 Aug 2020 01:35:21 -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-Virus: No X-Envelope-From: Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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, 8 Aug 2020 01:35:20 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id t6so4558558ljk.9 for ; Sat, 08 Aug 2020 01:35:20 -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=mruREGRnEyosSNGR2E78MppdIWJVe0RzwCGq9gQZ7g4=; b=jgPMGgzZigpIx9C5rEQVEUrnGlq3OfczQ4bvi3bXJkiknp/3miLEjppfC7ZT730zhC tFAZdSYC/tqrgIEK2uS/Q6tH6B3Mn12U1qTxH0mv+4euWfNRd0aQFniq/Nl8Ckkl51o9 0ihwc4qRo23MReMNVseMChyrZShdcA6cGlHyG58luidYzvT8YZ6PUidT6P6joNEpRs0K cpm2zpxpfbEadSbIkVIBUiOZwgCkmv9hJtSnjGRWJFmz5J4tNFeKqTUXkJH7NovmIJAE ZAwcLADbhTyZyOuEUDn64qDsH4TELsINSKO8U3xm46dJfw2bOfTsTW5MrzhhHt0N+llW OC9A== 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=mruREGRnEyosSNGR2E78MppdIWJVe0RzwCGq9gQZ7g4=; b=ZXX9JNTmqFYX7dgUI/6pOfuT/s1uYmCPOCBOTD987Os9GkbzWEWcKGMjke6rSiB+js MbdF3gZeTTbH3mpGGAStjcOS5IXE7I74Qbi0wpSA/Hx1M4liBVRS5fE77y1Ccb2hgJvV 6fB5PjU7uHy+KvZCI68/U+Eu8rOnPXhECY8wS7h3Nd8DLu0pea3pgK15vNqRfuh+7JKK U7nux/py/4A28S15G+qLNiur3t0WSXSOUjgujU3EEJejhy5eItfB20JUcIxWaJySBwoQ 7ORIRCBKKcdKlZufRe0Rw0T1QoKiRl/vK/MSm3vuVOK6LxCTp91snTzhAnlldoeiGtno Fbzw== X-Gm-Message-State: AOAM530lUBMueijqrntFcfcKR9hO18VNxD0IfQICdXHzk80B0OrrvULL +Y9dir8Y8sLJfuyG82QqCN772+94zdhMjmJ2zsA= X-Google-Smtp-Source: ABdhPJyxz7blcb4HifLKVGa+bzygYD9VPwIJZo61hn+8GniLSGm+sAI1ONuVe0uAnTmZdDFeAxcZLDAYM+1TP3wSt34= X-Received: by 2002:a2e:a586:: with SMTP id m6mr8570278ljp.458.1596875718301; Sat, 08 Aug 2020 01:35:18 -0700 (PDT) MIME-Version: 1.0 References: <20200806091749.64675445@mcmic-probook.opensides.be> In-Reply-To: Date: Sat, 8 Aug 2020 11:35:03 +0300 Message-ID: To: Theodore Brown Cc: Benjamin Eberlei , Rowan Tommins , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000f09b3205ac599907" Subject: Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2 From: benas.molis.iml@gmail.com (Benas IML) --000000000000f09b3205ac599907 Content-Type: text/plain; charset="UTF-8" > > > This is some new complexity, even if only a small amount right now. > My question remains about how much more added complexity it will > require later if we implement extensions like nested attributes. > What? Are you actually saying that 30 lines of code add "complexity"? I think you should look more at the PHP source code before going to these nonsensical conclusions. PHP is a fully fledged language, not a "let's write the shortest code possible" competition. As for the nested attributes, you can implement those with simple recursion. You are trying to create problems here that don't exist. > Yes, PHP has historically been rather verbose in some ways. > Thankfully this has been gradually changing, with the short array > syntax added in 5.4, and more recently short arrow functions, > constructor property promotion, and the match expression having an > explicit goal to reduce verbosity. > No offense intended but saying that 1 extra character somehow adds verbosity is quite honestly, one of the stupidest things I have heard. While we at it, let's also rename other keywords: `function` to `f`, `while` to `w` and `static` to `s`. You know, to save those few extra characters. > What is the goal of the grouped attribute construct? I still haven't > received an answer about what makes it better than `@@`. > You can't compare attribute syntax against attribute feature. You better tell me why `@@` is better than `@[]` using arguments and not with "boo, I have to type 1 extra character with `@[]`". As for the grouped attributes. Why do we allow grouped properties and class constants? It's alternative code style that some might prefer. > > Aren't docblock annotations only wrapped in /** */ because they have to > be inside a comment? There is no need for this with the native > attribute syntax. To me, the `#[]` and `@[]` tokens don't at all look > similar to docblock comment boundaries, anyway. > Even more so with `@@`, which look nothing alike to docblocks. Just because docblock annotations contain the same character as attribute syntax, it doesn't magically mean "it's like docblocks". Because if so, `@[]` looks far far more like docblocks than `@@`. > Best regards, > Theodore Best regards, Benas --000000000000f09b3205ac599907--