Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101337 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29979 invoked from network); 12 Dec 2017 16:33:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Dec 2017 16:33:06 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.21 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.21 mout.gmx.net Received: from [212.227.17.21] ([212.227.17.21:53984] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/74-53433-EB4003A5 for ; Tue, 12 Dec 2017 11:33:04 -0500 Received: from [192.168.2.106] ([79.243.127.224]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0McPvw-1egStf09o0-00HcOf; Tue, 12 Dec 2017 17:32:59 +0100 To: Nikita Popov , PHP internals References: Message-ID: <0cf2ccb3-aceb-03b8-051a-0cf04e41ee78@gmx.de> Date: Tue, 12 Dec 2017 17:32:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:W6++n6IUmg5m06XJ2kywEgXwfalRMAFNxZdq0x9HgrXFjSkL9mz OwpKJVaXHTP1XY5sfLCV5A8he9ISfqZg/UeRgDGvs32QrRupsiEBQk7s9Na9XAL4v1I/zGZ QXxcqXRk7S1Cg2xdVo+OAxinRdblBHl7+4en4JSMxbMygomrBy+NT5QzxiqSl0jPRCPitkp 53G0OmcadYM36PnZJ9EKw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Dp9AtqG8W8w=:7pShSfw5Me3cmAI1WXtGyf DkAD6iwT6z5VReY90X39cz1suUlCZtGifDpjtogrNu4Lktz+mO87NMZQ2YvgFe0qPWrSo4lSN kKaD2xcd6I/XVdvOY41GkSn5m99uXdMp7fiD8C9VsWLIA9ayYZqcm+SKJwxhHiO6ds72nhTVj e8V/14MFK5uhbyqnjtJuTI+bpKYBo5wMIIDh1DXg9tExxNH03oryn/ZhU+KsDioufWN4E7J9R cfHmgzagDh+UeZAK4kLU02CFhin3jtkTJWKvqjGUKNYoeZIZbID5jv97Va0nOWUgAEAi8EV6w QnsPYiU2GOkY6l2jWRNs2WkbapCxQvUYduXihXAkcj5uMASLKC9haJ9fXwDcOE7rLu21e1w87 frlgC8OBjaeq0tAB6ZGy+LTPFw0N8Ms9VHoEtUGH1gNPdLag07btltuaiists+928RWtk2Nhw SyXSo20KPOq9ZxYUAbexX+pwfU+nWKW1VT3KLP3E9u6mpoi71zFxjHqXOAWQHPwteXpshdb2o AzgJnuqyztkANzGCnTT5m/9xTeg71qAkuqJTlwq/zTH/DO4agixOLz+cT9quHbuMq9fayIsGP Ihnypmf5Rx/lt2bqL5Ky2QZuGu5QbsIuYD1W8bIDZZ5rp+k8LrvIEKqgZoX1WjwftTJ8lPPsV DkQ5I20zibqv8r0Fu7JdTD6XeNsMaY0F+vZnYr54N6wI8UIPp+OxIKvveSJ0q/Jw0bHjAC3Ps MrtiClE0qX3jXHmvYnSGi/tq7JlKshYtSbX4AbReUXhmbA8tLHyV7XEkg4m0TQAxCY+xuQGiy O3gawdyDQFtAqkEgaq54KgQ61miEni0CD9Ca0UluTzbtnluSkY= Subject: Re: [RFC] Namespace-scoped declares, again From: cmbecker69@gmx.de ("Christoph M. Becker") On 11.12.2017 at 14:43, Nikita Popov wrote: > Some time ago I introduced the following proposal for namespace-scoped > declares: > > https://wiki.php.net/rfc/namespace_scoped_declares > > The idea is to allow specifying declare directives for a whole library or > project using: > > namespace_declare('Vendor\Lib', ['strict_types' => 1]); > > I've finally gotten around to implementing this proposal ( > https://github.com/php/php-src/pull/2972) and would like to move forward > with it. Generally I'm not keen on letting the language diverge via whatever mechanism, but that has already happened and there seems to be some further need, and the namespace scoped declares appear to be preferable to per-file declares or even ini settings. What I don't like about the present proposal is that it introduces a proper function instead of a language construct. Is there a particular reason for this design decision? Couldn't we add the namespace scoped declares to the namespace declaration directly, e.g. namespace Foo declare strict_types=1; -- Christoph M. Becker