Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96117 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59332 invoked from network); 23 Sep 2016 19:56:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2016 19:56:15 -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.218.48 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.218.48 mail-oi0-f48.google.com Received: from [209.85.218.48] ([209.85.218.48:34791] helo=mail-oi0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/91-51000-ED885E75 for ; Fri, 23 Sep 2016 15:56:14 -0400 Received: by mail-oi0-f48.google.com with SMTP id a62so146844008oib.1 for ; Fri, 23 Sep 2016 12:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=DJ2Dhyc/su7HESH9yuleOD2+qrkPtoadKj/OJVlfF3s=; b=HSoqgFegXGr/ccWEv7IX52ffgQnAIu9oz53f4+0zMhVW2/tGyJAIW1MG4+P5rNsuAF sC4wWdPY4qrN9GA+APWg1AkQTW5DLIVZ+fCzMVjEy13QyAseSW8NztgWa8be9sAcO1+6 zmYrMVADuhM/e9Vtd6idSU287rYyG2KOzUE5oc1v8F4QHoXQacEqex6W9O7TsE64plEU 02dBupGBcMdti+xb0XOjYvPiCPcrl5PxRIQ/ycYTS1n6IT5nld1V/mU0vf/VXgW8y9FN zXap8LJgDyRAqhjelb/fwVHUN9nEb2UfaY6e+fuIejxPrpFvBfFa0wDgy3O/cxD47dqj cn6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=DJ2Dhyc/su7HESH9yuleOD2+qrkPtoadKj/OJVlfF3s=; b=HXQ74QChy8uhA0nKZBTolOmg0gd2UU5Dok+AUgPIlV5eITRkDPdQHvF42jl6yBrDy9 H3pV1Vo8JUpST42kpTSELtOIl18dd1In93yaq2l+xZOc6rmnWMOKbd15OrWQI+DsK2it vqzL6Rh4e6BnKHQjQgq59C6JPrJ7beqnPXIQz68Bf1zC4l9RA7/cq+CkneK0zYx3wEJ3 v/a40gaavOTA7O1Z/2Cnaqem85cm7/IrxmPTtD+dREAKkA8FGlJ0LJM8vLmGMoXeE07K VpL3ZQlWiPaOXxcNmScXk10vtsP33If2l7pz5toC6JeAOZoLaS1QjyQfv6DPTAY7EWb2 aZLw== X-Gm-Message-State: AE9vXwNJRtFVak6EqR4Zks4QZTzre97FfGkIsDAuYjO8hVX+Xcu0EZKnrzgC0PFPURtJ0A== X-Received: by 10.202.230.133 with SMTP id d127mr11764890oih.97.1474660572000; Fri, 23 Sep 2016 12:56:12 -0700 (PDT) Received: from [192.168.2.102] (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id s129sm2555986oia.9.2016.09.23.12.56.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Sep 2016 12:56:11 -0700 (PDT) To: Nikita Popov , PHP internals References: Message-ID: Date: Fri, 23 Sep 2016 12:56:10 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Namespace-scoped declares From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > keep in mind those 20 bits that are different in every file!". But after > delocalizing it, all hope is lost - you never know what the code in the > file actually means - because somebody could write code in completely > different file, maybe even JSON composer configuration or some other > config file you didn't even think to be able to change your language > semantics - and suddenly all the code works differently. Oh, I missed even worse feature - if you have namespace A\B\C, then you get shared semantic context not only from this namespace, but also from \A and \A\B. Which means basically that finding what semantic context you end up with becomes several times harder - you need to locate not only who may be controlling your namespace's context, but who is controlling contexts of all the parent ones. And each time a new semantic fork is introduced, you'd scan the whole tree and ensure every node on the way agrees on which side of the fork they are, or explicitly define it if you don't want to rely on all the parent chain always staying on the same side you are. -- Stas Malyshev smalyshev@gmail.com