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

2019-07-27 Thread CHU Zhaowei
The introduction in this RFC says "A common complaint is that this directive has to be specified in every single file.". I think people will complain import_declares if we follow your design. Regards, CHU Zhaowei > -Original Message- > From: Mark Randall > Sent: Sunday, July 28, 2019 6

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

2019-07-27 Thread Stanislav Malyshev
Hi! > I plan to pick up this proposal again. I think the motivation here has > become more pressing in the meantime. The strict_operators proposal is > under discussion, and Rowan's "locked classes" essentially concluded with > "doing this with a declare is better". I also think that this proposal

Re: [PHP-DEV] Re: [RFC] Explicit call-site send-by-ref syntax

2019-07-27 Thread Stanislav Malyshev
Hi! >> In short, while currently we have >> >> function byRef(&$ref) {...} >> byRef($var); >> >> this proposal would also allow >> >> function byRef(&$ref) {...} >> byRef(&$var); I am not sure why it is necessary. If you call a function, one would assume you know what it is doing,

Re: [PHP-DEV] Re: [RFC] Explicit call-site send-by-ref syntax

2019-07-27 Thread Stanislav Malyshev
Hi! > I think nowadays it is well known that by-reference passing is to be > avoided and I don't see it particularly commonly in user code. By-reference I don't think it's true. It depends on the style of coding, of course, but there are many situations where the most convenient solution is by-re

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

2019-07-27 Thread Mark Randall
On 27/07/2019 09:33, Rasmus Schultz wrote: On Thu, Jul 25, 2019 at 3:34 PM Nikita Popov wrote: Based on the received feedback, I plan to change this proposal from being "namespace-scoped" to being "directory-scoped" instead Personally I'm not a huge fan of using implicit hierarchical director

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

2019-07-27 Thread Rasmus Schultz
On Thu, Jul 25, 2019 at 3:34 PM Nikita Popov wrote: ... > Based on the received feedback, I plan to change this proposal from being > "namespace-scoped" to being "directory-scoped" instead ... I think that's a better approach. But please consider doing this without adding another global funct