Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111250 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22236 invoked from network); 29 Jul 2020 18:04:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jul 2020 18:04:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 822311804DB for ; Wed, 29 Jul 2020 10:01:02 -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-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 ; Wed, 29 Jul 2020 10:01:02 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id f5so25827141ljj.10 for ; Wed, 29 Jul 2020 10:01:01 -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=HSmH2ZrrBEBJpqWxZdTAQ/TyOlUYT4xKjENlpofh52k=; b=gVQD9korQ/Zk13Efzr9n0cknZl2wh0cId4eud9St2WcYECTAUV8P1bEap/DCXgCCkg HFv7IbE9842r+ZQWQllseqWCP1b3i6wBMr+WtkRhrro2H6BOQJLyZ2C1prodlyaX+QeV IrDrdoggVTvoUmcCuuj7PbFE8NMUEbLRhs4SJOr0t+VBMqn9afAyGsna23NlRBxNaXnu ucKTI45m58GhNfLB5VtLk7POW68fT+0883AuJJ6FupGWQo0Sja/Fre0MUac4wwstcbPl swaFtGxAizV4L15A9wDaq8Q2vbjoFj1uBklMNPmLldKy2dln+4mtBQTl6V3LWPkAtiA6 y7ww== 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=HSmH2ZrrBEBJpqWxZdTAQ/TyOlUYT4xKjENlpofh52k=; b=r1JJ/LajjJ5E77rMc4QUBReAqrwNxfBtSjmtjUwD+qXMbr90Qh4qa5Go4lLKjO8Cr4 p4NTh+9U3vMDgHcmKtcfDv/Bklecuxvu3MKT6H+1HcvbuM6RjDLHERC4SXeN1KfGwY2A MbQVGsUawPSmTIU6JPYCkfl6IyQ8f74HX1N7Z3pXMZXmnL4C5zBpqasK24gGYJ1HlF9Q iHKnpWgUDhzMZ0UssFmtYfVT8tueP6svrfJ/VlD7/ttekKbtjGcqs8ElZ/FmlkVUMtUD KSDLUNeaWfsJolNXve7/Rj/I5K6y9ZDIAud+c62bkAVy2K/a206ooZ0sq1EtxPtczhnS Cr2w== X-Gm-Message-State: AOAM5308Mi5Uq/wOeM6aVP9USve6Gyu8EPlnJFbPMO3RVu65l4fNRMKa S4T7OW4uJWK0gu3bZW6UPIlIp73jQDNMQhUtGHc= X-Google-Smtp-Source: ABdhPJy0b0aXOGb79nZ/cjpJudAHpI1vm6+lPr21/PBPagE/Eu8rbV6yvjgjnkOSbHVMtRhAdvizX2iF6/y+Gc+2tew= X-Received: by 2002:a2e:a583:: with SMTP id m3mr3083023ljp.135.1596042060471; Wed, 29 Jul 2020 10:01:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 29 Jul 2020 19:00:44 +0200 Message-ID: To: David Rodrigues Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000000fa31e05ab97803c" Subject: Re: [PHP-DEV] Allow two words keywords From: nikita.ppv@gmail.com (Nikita Popov) --0000000000000fa31e05ab97803c Content-Type: text/plain; charset="UTF-8" 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 use > attr or attribute names (eg. "function attr()"). > > But, if we create a new two-words keyword like "using attr()", maybe it > 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 --0000000000000fa31e05ab97803c--