Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110608 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7371 invoked from network); 16 Jun 2020 21:43:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Jun 2020 21:43:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4BB5A1804CB for ; Tue, 16 Jun 2020 13:28:35 -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=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (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 ; Tue, 16 Jun 2020 13:28:34 -0700 (PDT) Received: by mail-yb1-f169.google.com with SMTP id a80so108347ybg.1 for ; Tue, 16 Jun 2020 13:28:34 -0700 (PDT) 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=Cw4BvWKFB5OE4juBxyeCObXkDMLzBkW+ZHwixAg6Wt4=; b=rtE9JPNTKn44yR9zJVHr1Ss8iiPJ92euPNz9hSaen4P+aNlZ/t8GFMzLeNLGoAsZ57 HK+YPYAVqB/UZYi6XIqiqXjf6Nu6isb+E3O5Oa44EyMpzPYGnVCYw0XTOy6FhOTbBl8M dYKWILMbCrrvRIPzH9FaaVPHGoedQ29nhjMZvhqqUTAKoM7JZUrNKA1EXzflQ+p0fZb4 N9wquY8xoDVS42X5JCKjvKPgb1ckEOq5lSxC/BuYcTcjaYXPHN3NdlVK9Vz8g0iW/+3u e1HDNRVryAlDIFvCX1fYyLsuK4bLYRyvqkNtknWUT6LM1FXXiIul7QM4MKIu6Bq5VgOo 1FKw== X-Gm-Message-State: AOAM530EEzjhjUcd/7QHMfs+IF5pMO1EYCPKH67nNMGM74RXyf8a6QJj IESm/J+xgz0bgGvxVkb/SwlxkI/L0nFV+dufZZVWwA== X-Google-Smtp-Source: ABdhPJycH1rJMM+CVsaf0oRxOCkJ6aTaBcmFHPvp/Q/BsgYuUmAYHjAT95r8z/T7SSs7xzxY968eXVVSv8aHpK3ChQg= X-Received: by 2002:a25:69c3:: with SMTP id e186mr7739600ybc.445.1592339309569; Tue, 16 Jun 2020 13:28:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 16 Jun 2020 13:28:18 -0700 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000e8d3df05a8396272" Subject: Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions From: davey@php.net (Davey Shafik) --000000000000e8d3df05a8396272 Content-Type: text/plain; charset="UTF-8" On Tue, Jun 16, 2020 at 1:52 AM Nikita Popov wrote: > Hi internals, > > Inspired by the recent discussion on reserved keyword reservation, I'd like > to propose the following RFC: > > https://wiki.php.net/rfc/namespaced_names_as_token > > This RFC makes two related changes: Treat namespaced names as a single > token, which enables use of reserved keywords inside them. And remove > reserved keyword restrictions from various declarations. > > The RFC comes with a small backwards compatibility break related to names > that include whitespace, but will hopefully reduce the backwards > compatibility impact of future reserved keyword additions. > > Regards, > Nikita > The only issue I have with this RFC is this: use Foo as KEYWORD; While this might be _technically_ correct, it is unusable. That is: use Foo as List; class Bar extends List { } // this will not work Given this, I think this specific syntax should be an error, unless I'm missing something? Also, does this mean we can alias to fully namespaced names now? use \My\Foo as \Bar\Foo; class Bat extends \Bar\Foo { } // now actually extends \My\Foo, not \Bar\Foo (no autoload would happen?) - Davey --000000000000e8d3df05a8396272--