Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Mark Randall
On 13/08/2019 18:05, Rowan Collins wrote: This seems to be more complicated than Nicolas's version, and involve much more special magic, like the name __nsmeta, and the class that does nothing. I'm also not clear on how you're picturing the relationship between namespaces and packages. I was

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Stephen Reay
> On 14 Aug 2019, at 00:05, Rowan Collins wrote: > >> On 13/08/2019 12:01, Mark Randall wrote: >>> On 13/08/2019 10:02, Rowan Collins wrote: >>> I really like this approach. It allows a package definition file to exist, >>> without either the language or the header of each file having to

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Rowan Collins
On 13/08/2019 12:01, Mark Randall wrote: On 13/08/2019 10:02, Rowan Collins wrote: I really like this approach. It allows a package definition file to exist, without either the language or the header of each file having to define its location. # # File: /lib/company/project1/a/b/MyClass.php

[PHP-DEV] Re: Deprecate PHP's short open tags, again

2019-08-13 Thread Olumide Samson
Not sure what the counter argument is really driving at. So, because some people are using a function or an unworthy directive, then there can't be a major change in that aspect? Many languages clean up many unused functions, directives and so more just to meet some proper standard. I'm been

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Rowan Collins
On 13/08/2019 18:45, Mark Randall wrote: I thought about this as my first consideration, however it effectively requires that the PHP code within the package class is fully parsed and executed in order for it to retrieve the data. Consider pre-loading where the code is compiled, but not run,

Re: [PHP-DEV] PHP direction and governance [was: Re: [PHP-DEV] P++: FAQ]

2019-08-13 Thread Peter Bowyer
Hi Stas, Thanks for replying! On Sun, 11 Aug 2019 at 04:26, Stanislav Malyshev wrote: > The risk here however is for the document to be seen as a means to > "argue less" by way of excluding certain points of view from discussion. > That would not be a good thing. This is the main concern for

[PHP-DEV] Re: Deprecate PHP's short open tags, again

2019-08-13 Thread Olumide Samson
Not sure what the counter argument is really driving at. So, because some people are using a function or an unworthy directive, then there can't be a major change in that aspect? Many languages clean up many unused functions, directives and so more just to meet some proper standard. I'm been

Re: [PHP-DEV] PHP direction and governance [was: Re: [PHP-DEV] P++: FAQ]

2019-08-13 Thread Chase Peeler
On Tue, Aug 13, 2019 at 4:31 PM Peter Bowyer wrote: > Hi Stas, > > Thanks for replying! > > On Sun, 11 Aug 2019 at 04:26, Stanislav Malyshev > wrote: > > > The risk here however is for the document to be seen as a means to > > "argue less" by way of excluding certain points of view from

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Mark Randall
On 13/08/2019 21:26, Rowan Collins wrote: Ah, that makes sense. Does that necessarily mean we need a dummy class, though? The autoloading logic in the engine knows that it called the autoload callback expecting a package definition, so can count as success that the package is now defined. In

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Rowan Collins
On 13/08/2019 18:40, Liam Hammett wrote: This already works (except for the "encoding" declare, which would make little sense halfway down a file). spl_autoload_register(function ($className) { declare(strict_types=1) { include $className . '.php'; } }); This,

Re: [PHP-DEV] PHP direction and governance [was: Re: [PHP-DEV] P++: FAQ]

2019-08-13 Thread Stanislav Malyshev
Hi! > I disagree that (as I take away from your last sentence) the current > approach is better because it means people feel they have been properly > heard. I can think of recent messages on the list from people saying > that they don't feel heard. I'm not saying we have perfect record in

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Rowan Collins
On 12/08/2019 09:17, Nicolas Grekas wrote: Individual files could declare their package using this style: I really like this approach. It allows a package definition file to exist, without either the language or the header of each file having to define its location. Importantly, although

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-08-13 Thread Mark Randall
On 13/08/2019 10:02, Rowan Collins wrote: I really like this approach. It allows a package definition file to exist, without either the language or the header of each file having to define its location. # # File: /lib/company/project1/a/b/MyClass.php # Caveat would be for situations that do