Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101761 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4933 invoked from network); 4 Feb 2018 14:03:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2018 14:03:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:52122] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/75-49805-CA2177A5 for ; Sun, 04 Feb 2018 09:03:24 -0500 Received: by mail-wm0-f46.google.com with SMTP id r71so21423103wmd.1 for ; Sun, 04 Feb 2018 06:03:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=XS3X2mjtSoPjCj20RcZvnkpickEB2si5hKKoCpehaGI=; b=vRnpbRPkwDuMyhQnFQ+ydo0viTF1G8ZxGZmsc/QNAeKSU+PSA1eyMnPAxqVzkZX9nU 89wvOqxM44CIzNu50yp7SHHiJxogUQU3g7zy/6a4reWZDeLmqJJxOfYeFFzUrb0y2FqH 6SzO+L+ye4ODP5C4bW+nFQG6lmWizS4IgmfUNsLscJR+SEOaRiTF0QMKQHYYyysuhFOC /wwvFAe3OFPA31HrGQmTjzNBNSQ+lG3pTq4Plu+t0QGC3M4Q7gAX+NxJ64muNdtRma+f BI1EPjWgSpH3lMOWKwAiKGx0qpiCBC0rBZQwseqLgrPn/BvE+PnVKpK3HP9W7MKf0bg8 4xog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=XS3X2mjtSoPjCj20RcZvnkpickEB2si5hKKoCpehaGI=; b=YHkFFlHs2WL2AlzxyF8+mhBvNTqxeUFgOoWyCmoJAzgJyzlszRCmA3UZgIU4kyL9GG hieF863DLqU+CzJdS3CDai/erPsR/++ijur60cKEQt8iloKvUUkLDwezT8/q6324QZ05 U/70CeWYLL5cDvj8nTKugB6zDdUtFbza/3n2a4DObNRBY4hPUfBYSUnduQm77bplRsFn 7Cs8eqjJas0l/ng/vAoafp9D60t5BMz+fkkgykaYZrxy7LoHX36Gudl64KBE1n7/IHLG choiflypoTdooaOoyqTDEOccXNkagfTyle9hK8YmW0Ek8W/A97lUIzLzqmrAx2QM2xgU u9ig== X-Gm-Message-State: AKwxytfQufTtnlZzB8i3ETw0vzdRdQSK8nm97uQ5r/0VlZX4XLJ4z+rd 16RVfuTFyFt51aCFiUqr5o+eYA== X-Google-Smtp-Source: AH8x225GujveP5W4tlrjwlnFDgX79k34JhPUeJ71EW02TTpxeYvORiABFTK/LuJ2BAL0aY6uQVC8AA== X-Received: by 10.80.170.157 with SMTP id q29mr77377743edc.43.1517753001532; Sun, 04 Feb 2018 06:03:21 -0800 (PST) Received: from android-c07b90b023759a5a (host31-48-151-88.range31-48.btcentralplus.com. [31.48.151.88]) by smtp.gmail.com with ESMTPSA id k12sm5273572edl.86.2018.02.04.06.03.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Feb 2018 06:03:20 -0800 (PST) Date: Sun, 04 Feb 2018 14:03:18 +0000 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: internals@lists.php.net,Wes Message-ID: <881E738D-F30A-4CF4-8501-2B97AF9812D4@gmail.com> Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope From: rowan.collins@gmail.com (Rowan Collins) On 3 February 2018 08:27:18 GMT+00:00, Wes wrote: >Hello PHPeople=2E I just published the RFC "Deprecation of fallback to >root >scope"=2E > >It is quite a substantial change, but as you can read in the RFC, can >be a >(basically) transparent one=2E >I'm referring to the possibility to shim it in userland=2E=20 I'm torn on this one=2E On the one hand, I think in hindsight this is how = functions in namespaces should have worked when they were introduced in PHP= 6, I mean 5=2E3=2E \foo isn't the prettiest syntax, but people soon got us= ed to writing class names that way, including built in ones like \DateTime= =2E It would make function autoloading simpler, lead to less ambiguous code= , and make namespaces work consistently across token types, rather than one= way for classes and a different way for functions and constants=2E On the other hand, the BC break of moving to that now (or committing ourse= lves to in the future) is significant, and even raising a notice of whateve= r level could be highly disruptive=2E A lot of code bases will issue this m= essage hundreds or thousands of times; I wouldn't be surprised if just the = code to format the string and pass it to an active error handler might resu= lt in a measurable performance impact in some cases=2E Crucially, the propo= sed shim can't actually be written yet, so the only way to suppress these n= otices will be to edit every single source file, which even if perfectly au= tomated creates a lot of noise in version control=2E I think some less invasive way would need to be found to make existing cod= e run the same way, without notices, before and after the change=2E For ins= tance, if you could opt into the old behaviour by writing "import global fu= nctions" at the top of a file, or opt into the new behaviour by writing "na= mespace only Foo", or since autoloading is a key benefit, "namespace Foo wi= th autoload"=2E It wouldn't be ideal, because it means the engine has to su= pport both modes, but it would be far less painful than adding \ into thous= ands of lines of existing code=2E Regards, --=20 Rowan Collins [IMSoP]