Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101790 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53982 invoked from network); 6 Feb 2018 19:31:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2018 19:31:44 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.53 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.160.53 mail-pl0-f53.google.com Received: from [209.85.160.53] ([209.85.160.53:38266] helo=mail-pl0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/57-49805-E920A7A5 for ; Tue, 06 Feb 2018 14:31:44 -0500 Received: by mail-pl0-f53.google.com with SMTP id 13so1887264plb.5 for ; Tue, 06 Feb 2018 11:31:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RsUDSf9/fzp2/3gXzG3b+K2Z0e24Ah08WHlE7Zo6dOw=; b=Bvssu8LqePzF9IvNLNKHGI+JgUCIUlaZLPKhUWL+cTxJpw7CqAqZYUiIQ+S0Ws1sUP JuHg2yQykNfwVJ01koS5MQrwLGnfvjiQhX2X3aXH4s2EgJh1mM09m7+cRinxKe4yzbmB LVpp5SRUk+85zTBXpVTqHqoOcNBNO3HG8Qio0kNTRG1XO3FHVLg/lZXtuBVxGtjDGqOJ nKS/4VTbCeXdL71FRIgOGdbj0bqb1RDh8/DVOqEmLeU7pJG765WOLJrbHl3qOrB7tJgg ZThoWSrDGMxemJ31LrSMalo8FwaCB98VaG2e2VXWlVOAmFKygM+L4Q3rKTpOUs8t+W03 NbfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RsUDSf9/fzp2/3gXzG3b+K2Z0e24Ah08WHlE7Zo6dOw=; b=tETHgSzPHtzi4oLXfmLoG8PZwbR0HU6n4DHITQADo/Ckh8XDPnNusheJyUAKD68qoq pPzdB21NpDWkcmqE8OopcjWXTcu87D94IGOUR1MDL5yQZpcMtPxDIqTQZp7BNiHqyphu dG5ik3lavS/OmNY05LDUvI3ZDaESCVt2bdDuUFtppAY3DJwAZnKKnHMpe7iq5t2Bpw+m 1lJTqZ/oTQZKT79EsNRkP21+A0mn3MVXmJLfIVwnesoxizVCrZs/lRNj8TzJajfJHUdl Nm3BkLZq/4n+wUXuY45Q2/4seyGrypcTfO3ubZ3nPmOMyT7zF8TsOIVLljS/F7vLM9Wk DYOA== X-Gm-Message-State: APf1xPBwTON+AR1+NUEuT2DvfeGCH/8bDQvLAmfwbbqW3JDbf339gX4T kzVODQ5MMWZCPq1ceB/fdK86qDY= X-Google-Smtp-Source: AH8x225DFSvTwSlm/Xkbb9AyLyLuMBG32XvY1hH1bvupCdRfuHmkP1dWETLRQeqHBmTa1RE3P1KSug== X-Received: by 2002:a17:902:570f:: with SMTP id k15-v6mr3338646pli.321.1517945499637; Tue, 06 Feb 2018 11:31:39 -0800 (PST) Received: from Stas-Pro-2016.lan (c-73-71-144-171.hsd1.ca.comcast.net. [73.71.144.171]) by smtp.gmail.com with ESMTPSA id q10sm14395558pfl.106.2018.02.06.11.31.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 11:31:39 -0800 (PST) To: "Christoph M. Becker" , Benjamin Eberlei , Wes Cc: PHP Internals References: <07d9e3a0-d516-aa77-4818-ce8b02e8dd08@gmail.com> <79b192e6-a6bd-bd13-6bd4-b56011a5eac2@gmx.de> Message-ID: <8772d304-b205-e46c-1383-9f194277dcdb@gmail.com> Date: Tue, 6 Feb 2018 11:31:37 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:58.0) Gecko/20100101 Thunderbird/58.0 MIME-Version: 1.0 In-Reply-To: <79b192e6-a6bd-bd13-6bd4-b56011a5eac2@gmx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope From: smalyshev@gmail.com (Stanislav Malyshev) Hi! >>> To get the same benefits (jit and such) wouldn't it be better to introduce >>> a "use function root;" or similar statement or a declare() to specify this >>> file imports all root functions? >> >> We already have this right now, […] > > Do we? AFAIK, it is not possible to import *all* functions (or even all > symbols, for that matter) of a namespace, without explicitly mentioning > them. We are talking about global namespace aka standard PHP functions, so it works out of the box. If you're talking about non-global namespace, there's no such thing as "all functions of a namespace" at all, and even if there were, in most cases it's the wrong thing (excepting some rare cases like you want to override all PHP function for testing, etc.) to do. Namespaces are meant to keep things separate, so blanket imports just put us back into a pre-namespace world with all the problems that existed there. Granted, there are rare cases - as overriding whole extension or whole standard library - but they are rare. In overwhelming majority of cases, this is not what should be done and if you do it, you usually get in trouble. -- Stas Malyshev smalyshev@gmail.com