Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111258 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 907 invoked from network); 30 Jul 2020 10:53:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Jul 2020 10:53:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1506D180509 for ; Thu, 30 Jul 2020 02:50:03 -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-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (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 02:50:02 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id v6so12340711iow.11 for ; Thu, 30 Jul 2020 02:50:02 -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=0Q432/Gikbao8QrDaE+Az073ObroEMseHVfM/zaAUZo=; b=a+LJ/j39+Xcz8HqGlmkiDuFBgpFDEDECgJN8Nlzuqz6TGSExX8gt+Egz6tVuESKh5T Zag3aymb1UjMG819QdFNOdGplhMKPmnDqxyNRbsG3gwuAqrs1FNCGZkWDqaBhiYLhQ0d UkkFA5rz1AkIJERhA+TJH4xUfSWfAwiuzp1pr9x29SQAt8qE8yKI8EZ932HSdh7eP13M lwnKqy4V4yBuR9BeJlnk8mosYLs+5mWLodeDQHc2crkVUG+hbSUEkJenwy3NNuWwj47F vBqxkzMeAMp00a7ntjGVD4/h76LWTqXoWwTPs9KRyvInEWBRtqsyx1D59vJ+BDQeug7J pt+Q== 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=0Q432/Gikbao8QrDaE+Az073ObroEMseHVfM/zaAUZo=; b=HEVO9iJrfLYWrc0O0ogObuEib4pK3AzzKUKfIbvD9slZyApW0bET+19M9Y+bT6uSpv JDjY1PIyGhHIuEhNch0yrSBWGsTMbVxu/xmaYchxw/WX1e1jqZKbZ9VIpM1vO9cmHReC yEVDVwAeaeWsq1EQ+CuSX8mLG3G76/m1JxrhC0HGz+uUELl8p4nidzUqkHUUsudhuNFY jbp8SQ/8GuYBf11v4tLW+Og3FrmMsuMnnCy34fQB8MtjMewJaQeiaohPXH1E29UG+wRO dQ+9PWlCjHiuNNOrrSqWLsGuLusWCvMGBvdUc9fGW0tJFQzNgD592oBDVIt1ZzfduuzH TB5Q== X-Gm-Message-State: AOAM532EPE5h8T/RVHsAfbdFUy2awDfNka1isTf5LcR8VuLHE5JmX5qQ VJbRNG5FTixA6j4OtgXRXg3mSboUb9vYtaP6XxQ= X-Google-Smtp-Source: ABdhPJyIKCo43bIff0Tg3l7tQVUXjLzcWdT/D2hB6A94J6folK/qsT60Mg0vbn0S9DGYAo7HAy6S8z2ywsNYq8T1LPM= X-Received: by 2002:a02:108a:: with SMTP id 132mr2521891jay.131.1596102597113; Thu, 30 Jul 2020 02:49:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 30 Jul 2020 11:49:46 +0200 Message-ID: To: David Rodrigues Cc: Nikita Popov , PHP Internals Content-Type: multipart/alternative; boundary="000000000000537df205aba598ac" Subject: Re: [PHP-DEV] Allow two words keywords From: deleugyn@gmail.com (Deleu) --000000000000537df205aba598ac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Such a nice syntax. Even better than @@ and @. I wish this could get more attention/traction. On Wed, Jul 29, 2020, 19:46 David Rodrigues wrote: > Oh, you are right! "yield from" is not common for me currently, so I real= ly > skipped it. > > In this case, is there some problem to apply it to Attribute case? "using > attribute(Attribute())" or something like that? > > > Atenciosamente, > David Rodrigues > > > Em qua., 29 de jul. de 2020 =C3=A0s 14:01, Nikita Popov > escreveu: > > > On Wed, Jul 29, 2020 at 6:50 PM David Rodrigues > > wrote: > > > >> Hello! > >> > >> I do not know if there is some consensus about "why not use two words > as a > >> single keyword" in programming language in general, but I really found= a > >> few examples of it, as in SQL with "GROUP BY", for instance. > >> > >> So I question if it could be used on PHP to expand the keywords > repertoire > >> by mixing two words without causes BC. > >> > >> I will use the Attribute syntax-war to exemplify. > >> > >> I really prefer to create a new keyword "attr()" or "attribute()" to > make > >> attributes possible. It basically uses the same function-like with > >> arguments to work. But it invariably will cause BC to old codes that u= se > >> attr or attribute names (eg. "function attr()"). > >> > >> But, if we create a new two-words keyword like "using attr()", maybe i= t > >> will not cause any BC, because "function using attr()" is impossible, > but > >> "using attr(X) function attr()" will do. > >> > >> I do not know if I am being high with peanuts, but maybe it could be > >> considered to this discussion and make possible new features on PHP > >> without > >> creating strange symbols like @@ or #[] that will requires that new > users > >> check the documentation about "what it mean", while is very hard to > Google > >> symbols (so search will be "what mean double at in PHP" or "what mean > >> hashtag brackets"). > >> > >> > >> Atenciosamente, > >> David Rodrigues > >> > > > > PHP does have a two word keyword: "yield from" > > > > Nikita > > > --000000000000537df205aba598ac--