Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106560 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61043 invoked from network); 12 Aug 2019 16:32:37 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 12 Aug 2019 16:32:37 -0000 To: internals@lists.php.net References: Date: Mon, 12 Aug 2019 15:00:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Posted-By: 94.4.34.143 Subject: Re: [PHP-DEV] [RFC] Namespace-scoped declares, again From: markyr@gmail.com (Mark Randall) Message-ID: On 12/08/2019 14:45, Larry Garfield wrote: > I don't think declaring the package in each file is necessarily bad. Every language I've worked in either has you declare a package explicitly or implies it off of the file system and you don't get any say in the matter. Of the two, I prefer the former. I concur with this, I would much rather specify a reference to external metadata once-per-file than have it controlled by invisible external state. If I send an individual file to a co-worker, IMO it should be immediately obvious at the top of that file that it belongs to package and may depend on that package definition to control its behaviour (especially if it gets loaded up with declares or editions). I'll simply be replacing my ubiquitous strict-types declare with whatever was used to reference this package. Mark Randall