Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101802 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19095 invoked from network); 7 Feb 2018 16:40:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2018 16:40:19 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wm0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:36376] helo=mail-wm0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/4E-49805-3FB2B7A5 for ; Wed, 07 Feb 2018 11:40:19 -0500 Received: by mail-wm0-f44.google.com with SMTP id f3so4552633wmc.1 for ; Wed, 07 Feb 2018 08:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=kuoPE9tnhVNzb2tevQVMb0H69ZgEbayGNRklNcFZ3bU=; b=IT1lcwXb9gBunGpA/8Jklna1auQbYjusR8kyLvA5tNq5EjqgrKgvWX3UbDAfrGukC6 6I6Z8QdpTX5+mcWz9HzEhUnZqaV2ehChKPFijK9539/DyMFlzuR+4VhaD4D2H1uGjTWR ZEBH4mxkBNz/blPb53JaaySdmJhWTGtfSdBkxRcmelX2eyiIpHcj9LUFAJJiDd/M+ADG h1FecexCIQdigQDywiXJVBTRc7U2lrB/f5qEWCMq7wtzcbsN+Cucdt4ZM3Ozx05iYTJ0 vZCwYtp8a5EfhSVb8kNd4qja4cLv2v04TE+qDGDtcps4sd+dKLwW90GzU+eIP4TBMrrm ohYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=kuoPE9tnhVNzb2tevQVMb0H69ZgEbayGNRklNcFZ3bU=; b=lUwawKCtivRRWEHwmn8jKBqnRKwRm+JhWXmenmAcjl0O0LJSdRHtQ9Uo4shoEN9Idm jWLMNPkOHXsPsAX5PQIeDpAB9Rb/R8nH3ymIpY1la+5pisGlrTmsLzWgbuCn6upS2uLB ZknveT3/lLP4Sz6melt6oeL//5tNDKC8gQgzLe+cQpFrxTm4eQkfVzb+OsOHntEg6dBI gLNOZ3XwKHwvajMIWwpu74DTR6FxrgrtHMDeZTfRqXOK+fSQ6IhquWh54gRVIi1QS+0U 5mvSdC3aYHEwdDUHo7Sr4o+Tj10XMFgQUf+FXBBH7QCs6ZhJNnnAUhF6at9dKvHkSXLH szuA== X-Gm-Message-State: APf1xPDvCHVdCRdBooPmXuO07+I0pY1WnPtaMd1HLce5+6mYo0hRVy07 898zya+EFTcgU/fkQGYt7YnzebpBegC7ys1u5q39Dg== X-Google-Smtp-Source: AH8x227RxI8ciyVO3oYdOP59eoVO4NeJb2fhCXzt4zboMCSdoGc0+anEVamxzXi9k+lWrsIsgmwOt1mJ3jv6aFWqRs8= X-Received: by 10.80.194.146 with SMTP id o18mr9283529edf.67.1518021616156; Wed, 07 Feb 2018 08:40:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.222.195 with HTTP; Wed, 7 Feb 2018 08:40:15 -0800 (PST) In-Reply-To: <64436d68-1be9-0c8f-ae62-bf2adeca78a0@gmx.de> References: <64436d68-1be9-0c8f-ae62-bf2adeca78a0@gmx.de> Date: Wed, 7 Feb 2018 16:40:15 +0000 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="94eb2c1ccc9031467d0564a1f33b" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope From: rowan.collins@gmail.com (Rowan Collins) --94eb2c1ccc9031467d0564a1f33b Content-Type: text/plain; charset="UTF-8" On 7 February 2018 at 15:20, Christoph M. Becker wrote: > On 07.02.2018 at 15:02, Rowan Collins wrote: > > > - PHP 7.3: Add syntax to explicitly reference functions and constants in > > the current namespace, such as .\foo or this\foo > > It is already possible to use the `namespace` keyword for this, see > . > Huh, I never knew that! Funnily enough, I thought of that as a possibility (because it's already a reserved word) but rejected it as too long. :P > > - Slightly uglier syntax. > > IMHO, .\foo is very ugly, and namespace\foo is not much better. > Yeah; the question is whether that ugliness is something we're willing to live with for the performance and features it would enable. Most code would still be less ugly than if we had to prefix all global functions, anyway. Something worth considering is that even when using namespaced functions, the shorthand is only available in *exactly the current namespace*, so you're rather likely to be qualifying or importing them anyway. For instance, they might be in a child or neighbouring namespace called "...\functions" or " ...\ utils" or " ...\ streams". Regards, -- Rowan Collins [IMSoP] --94eb2c1ccc9031467d0564a1f33b--