Re: [PHP-DEV] Namespace-private class properties

2020-09-22 Thread Olle Härstedt
2020-09-22 14:51 GMT, guilhermebla...@gmail.com : > This should answer your question: > https://github.com/php/php-src/pull/947#issuecomment-224912697 > Yes, indeed. "The reason comes due to how namespaces are implemented in the language, where they only exist at compile time." Pity. > On Tue,

Re: [PHP-DEV] Namespace-private class properties

2020-09-22 Thread guilhermebla...@gmail.com
This should answer your question: https://github.com/php/php-src/pull/947#issuecomment-224912697 On Tue, Sep 22, 2020 at 7:38 AM Olle Härstedt wrote: > > 2020-09-21 21:50 GMT, Rowan Tommins : > > On 21/09/2020 17:13, Michael Morris wrote: > >> Next thing to consider - we have the problem of

Re: [PHP-DEV] Namespace-private class properties

2020-09-22 Thread Olle Härstedt
2020-09-21 21:50 GMT, Rowan Tommins : > On 21/09/2020 17:13, Michael Morris wrote: >> Next thing to consider - we have the problem of having already used the >> protected keyword in PHP, and honestly I prefer PHP's interpretation of >> the >> word. > > > I think it's actually Java that's the

Re: [PHP-DEV] Namespace-private class properties

2020-09-21 Thread Rowan Tommins
On 21/09/2020 17:13, Michael Morris wrote: Next thing to consider - we have the problem of having already used the protected keyword in PHP, and honestly I prefer PHP's interpretation of the word. I think it's actually Java that's the outlier here: PHP's meaning of "protected" corresponds

Re: [PHP-DEV] Namespace-private class properties

2020-09-21 Thread Olle Härstedt
2020-09-21 16:13 GMT, Michael Morris : > This sort of thing would be useful. Drupal and Symfony both mark methods in > their libraries that aren't supposed to be used externally, but people do > anyway and then they get mad at the framework developers when they decide > to rearrange what are

Re: [PHP-DEV] Namespace-private class properties

2020-09-21 Thread Michael Morris
This sort of thing would be useful. Drupal and Symfony both mark methods in their libraries that aren't supposed to be used externally, but people do anyway and then they get mad at the framework developers when they decide to rearrange what are supposed to be internal methods. I wrote a userland

Re: [PHP-DEV] Namespace-private class properties

2020-09-19 Thread Rowan Tommins
On 17/09/2020 13:28, Olle Härstedt wrote: We have public, protected and private. Since PHP has no module system, we have no qualifier to mark a class property as "private for this module". One solution to this could be to add a new qualifier "internal", to make properties public within the

Re: [PHP-DEV] Namespace-private class properties

2020-09-19 Thread Olle Härstedt
On Sat, 19 Sep 2020, 09:20 Olle Härstedt, wrote: > > On Fri, 18 Sep 2020, 00:13 Mike Schinkel, wrote: > >> >> >> > On Sep 17, 2020, at 8:28 AM, Olle Härstedt >> wrote: >> > >> > (NB: This idea is NOT about namespace visibility for classes, >> interfaces or >> > traits (already discussed here:

Re: [PHP-DEV] Namespace-private class properties

2020-09-19 Thread Olle Härstedt
On Fri, 18 Sep 2020, 00:13 Mike Schinkel, wrote: > > > > On Sep 17, 2020, at 8:28 AM, Olle Härstedt > wrote: > > > > (NB: This idea is NOT about namespace visibility for classes, interfaces > or > > traits (already discussed here: > https://wiki.php.net/rfc/namespace-visibility). > > It's about

Fwd: [PHP-DEV] Namespace-private class properties

2020-09-18 Thread Olle Härstedt
-- Forwarded message - From: Olle Härstedt Date: Fri, 18 Sep 2020, 11:23 Subject: Re: [PHP-DEV] Namespace-private class properties To: Michał Marcin Brzuchalski On Fri, 18 Sep 2020, 06:15 Michał Marcin Brzuchalski, < michal.brzuchal...@gmail.com> wrote: > Hi Olle

Re: [PHP-DEV] Namespace-private class properties

2020-09-17 Thread Mike Schinkel
> On Sep 17, 2020, at 8:28 AM, Olle Härstedt wrote: > > (NB: This idea is NOT about namespace visibility for classes, interfaces or > traits (already discussed here: > https://wiki.php.net/rfc/namespace-visibility). > It's about adding a *new* visibility qualifier, call it "internal", to >

[PHP-DEV] Namespace-private class properties

2020-09-17 Thread Olle Härstedt
(NB: This idea is NOT about namespace visibility for classes, interfaces or traits (already discussed here: https://wiki.php.net/rfc/namespace-visibility). It's about adding a *new* visibility qualifier, call it "internal", to make properties private inside a namespace. The purpose is to make